mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-08-02 13:34:07 +08:00
feat(PostgreSQL): Get the PostgreSQL sequences
This commit is contained in:
@ -271,4 +271,13 @@ public interface MetaData {
|
||||
*/
|
||||
String sequenceDDL(Connection connection, @NotEmpty String databaseName, String schemaName,
|
||||
@NotEmpty String tableName);
|
||||
|
||||
/**
|
||||
* Querying sequences simple information
|
||||
*
|
||||
* @param connection
|
||||
* @param databaseName
|
||||
* @return
|
||||
*/
|
||||
List<SimpleSequence> sequences(Connection connection, String databaseName, String schemaName);
|
||||
}
|
@ -193,4 +193,9 @@ public class DefaultMetaService implements MetaData {
|
||||
@NotEmpty String tableName){
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SimpleSequence> sequences(Connection connection, String databaseName, String schemaName){
|
||||
return null;
|
||||
}
|
||||
}
|
@ -5,6 +5,8 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Sequence information
|
||||
*
|
||||
@ -14,7 +16,8 @@ import lombok.experimental.SuperBuilder;
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Sequence {
|
||||
public class Sequence implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String nspname;
|
||||
private String relname;
|
||||
private String typname;
|
||||
|
@ -0,0 +1,30 @@
|
||||
package ai.chat2db.spi.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Simple sequence information
|
||||
*
|
||||
* @author Sylphy
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SimpleSequence implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* Sequence Name
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* description
|
||||
*/
|
||||
private String comment;
|
||||
}
|
Reference in New Issue
Block a user