mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-07-29 18:53:12 +08:00
feat(PostgreSQL): Get the PostgreSQL sequences
This commit is contained in:
@ -0,0 +1,50 @@
|
||||
package ai.chat2db.server.domain.api.param;
|
||||
|
||||
|
||||
import ai.chat2db.server.tools.base.wrapper.param.PageQueryParam;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* Pagination query sequence information
|
||||
*
|
||||
* @author Sylphy
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SequencePageQueryParam extends PageQueryParam {
|
||||
private static final long serialVersionUID = 1364512325486354343L;
|
||||
|
||||
/**
|
||||
* Corresponding source id stored in the database
|
||||
*/
|
||||
@NotNull
|
||||
private Long dataSourceId;
|
||||
|
||||
/**
|
||||
* Corresponding connection database name
|
||||
*/
|
||||
@NotNull
|
||||
private String databaseName;
|
||||
|
||||
/**
|
||||
* Sequence Name
|
||||
*/
|
||||
private String sequenceName;
|
||||
|
||||
|
||||
/**
|
||||
* schema
|
||||
*/
|
||||
private String schemaName;
|
||||
|
||||
/**
|
||||
* if true, refresh the cache
|
||||
*/
|
||||
private boolean refresh;
|
||||
}
|
@ -1,7 +1,10 @@
|
||||
package ai.chat2db.server.domain.api.service;
|
||||
|
||||
import ai.chat2db.server.domain.api.param.SequencePageQueryParam;
|
||||
import ai.chat2db.server.domain.api.param.ShowCreateSequenceParam;
|
||||
import ai.chat2db.server.tools.base.wrapper.result.DataResult;
|
||||
import ai.chat2db.server.tools.base.wrapper.result.ListResult;
|
||||
import ai.chat2db.spi.model.SimpleSequence;
|
||||
|
||||
/**
|
||||
* Sequence source management services
|
||||
@ -10,4 +13,6 @@ import ai.chat2db.server.tools.base.wrapper.result.DataResult;
|
||||
*/
|
||||
public interface SequenceService {
|
||||
DataResult<String> showCreateSequence(ShowCreateSequenceParam request);
|
||||
|
||||
ListResult<SimpleSequence> pageQuery(SequencePageQueryParam request);
|
||||
}
|
||||
|
Reference in New Issue
Block a user