Documentation ¶
Index ¶
- type DS
- func (ds *DS) Close(dbName string) error
- func (ds *DS) CreateSchema(ctx context.Context, dbName, schemaName, commentInfo string) (err error)
- func (ds *DS) ExecuteDDL(ctx context.Context, dbName, logicDBName, tableName, ddlStatement string) (err error)
- func (ds *DS) GetColumns(ctx context.Context, dbName string) (dbTableColMap map[string]map[string]*dboperator.TableColInfo, err error)
- func (ds *DS) GetColumnsUnderTable(ctx context.Context, dbName, logicDBName string, tableNames []string) (tableColMap map[string]*dboperator.TableColInfo, err error)
- func (ds *DS) GetDataBySQL(ctx context.Context, dbName, sqlStatement string) (rows []map[string]interface{}, err error)
- func (ds *DS) GetTableData(ctx context.Context, dbName, schemaName, tableName string, ...) (rows []map[string]interface{}, err error)
- func (ds *DS) GetTablesUnderDB(ctx context.Context, dbName string) (dbTableMap map[string]*dboperator.LogicDBInfo, err error)
- func (ds *DS) Open(config *gormx.Config) error
- func (ds *DS) Ping(dbName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DS ¶
type DS struct {
Operator dboperator.IOperator
}
func (*DS) CreateSchema ¶
CreateSchema 创建逻辑库
func (*DS) ExecuteDDL ¶
func (ds *DS) ExecuteDDL(ctx context.Context, dbName, logicDBName, tableName, ddlStatement string) (err error)
ExecuteDDL 执行DDL
func (*DS) GetColumns ¶
func (ds *DS) GetColumns(ctx context.Context, dbName string) (dbTableColMap map[string]map[string]*dboperator.TableColInfo, err error)
GetColumns 获取指定库所有逻辑库及表下字段列表
func (*DS) GetColumnsUnderTable ¶
func (ds *DS) GetColumnsUnderTable(ctx context.Context, dbName, logicDBName string, tableNames []string) (tableColMap map[string]*dboperator.TableColInfo, err error)
GetColumnsUnderTable 获取指定库表下字段列表
func (*DS) GetDataBySQL ¶
func (ds *DS) GetDataBySQL(ctx context.Context, dbName, sqlStatement string) (rows []map[string]interface{}, err error)
GetDataBySQL 执行自定义
func (*DS) GetTableData ¶
func (ds *DS) GetTableData(ctx context.Context, dbName, schemaName, tableName string, pageInfo *dboperator.Pagination) (rows []map[string]interface{}, err error)
GetTableData 执行查询表数据, pageInfo为nil时不分页
func (*DS) GetTablesUnderDB ¶
func (ds *DS) GetTablesUnderDB(ctx context.Context, dbName string) (dbTableMap map[string]*dboperator.LogicDBInfo, err error)
GetTablesUnderDB 获取该库下所有逻辑库及表名
Click to show internal directories.
Click to hide internal directories.