Documentation
¶
Index ¶
- type BatchRequest
- type BatchResponse
- type BatchStatus
- type ChainRequest
- type ChainResponse
- type Intent
- type ReadAllCounts
- type ReadColumnNames
- type ReadColumnProperties
- type ReadColumnSchema
- type ReadCount
- type ReadDatabaseNames
- type ReadDatabaseProperties
- type ReadDatabaseSchema
- type ReadTableNames
- type ReadTableProperties
- type ReadTableSchema
- type Response
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchRequest ¶
func Batch ¶
func Batch(requests ...database.Request) BatchRequest
func (BatchRequest) IsPrefab ¶
func (b BatchRequest) IsPrefab() bool
IsPrefab implements database.Request.
func (BatchRequest) ResponseOnError ¶
func (b BatchRequest) ResponseOnError() database.Response
ResponseOnError implements database.Request.
func (BatchRequest) ResponseOnSuccess ¶
func (b BatchRequest) ResponseOnSuccess() database.Response
ResponseOnSuccess implements database.Request.
type BatchResponse ¶
type BatchResponse []*Response
func (*BatchResponse) Code ¶
func (c *BatchResponse) Code() int
func (*BatchResponse) Message ¶
func (c *BatchResponse) Message() string
type BatchStatus ¶
type BatchStatus []Status
func (BatchStatus) AllSuccess ¶
func (s BatchStatus) AllSuccess() bool
func (BatchStatus) GetErrorIndices ¶
func (s BatchStatus) GetErrorIndices() []int
type ChainRequest ¶
func Chain ¶
func Chain(requests ...database.Request) ChainRequest
func (ChainRequest) IsPrefab ¶
func (c ChainRequest) IsPrefab() bool
IsPrefab implements database.Request.
func (ChainRequest) ResponseOnError ¶
func (c ChainRequest) ResponseOnError() database.Response
ResponseOnError implements database.Request.
func (ChainRequest) ResponseOnSuccess ¶
func (c ChainRequest) ResponseOnSuccess() database.Response
ResponseOnSuccess implements database.Request.
type ChainResponse ¶
type ChainResponse []*Response
func (*ChainResponse) Code ¶
func (c *ChainResponse) Code() int
func (*ChainResponse) Message ¶
func (c *ChainResponse) Message() string
type Intent ¶
type Intent struct {
Type database.RequestType
Operation any
Args []any
}
func (Intent) ResponseOnError ¶
ResponseOnError implements database.Request.
func (Intent) ResponseOnSuccess ¶
ResponseOnSuccess implements database.Request.
type ReadAllCounts ¶
type ReadAllCounts struct {
DatabaseName string
TableNames []string
// contains filtered or unexported fields
}
args = [[database name, table name], [database name, table name], ...]
func NewReadAllCounts ¶
func NewReadAllCounts(databaseName string, tableNames []string) ReadAllCounts
func (ReadAllCounts) ResponseOnError ¶
func (ReadAllCounts) ResponseOnSuccess ¶
type ReadColumnNames ¶
type ReadColumnNames struct {
DatabaseName string
TableName string
// contains filtered or unexported fields
}
args = [database name, table name]
func NewReadColumnNames ¶
func NewReadColumnNames(databaseName, tableName string) ReadColumnNames
func (ReadColumnNames) ResponseOnError ¶
func (ReadColumnNames) ResponseOnSuccess ¶
type ReadColumnProperties ¶
type ReadColumnProperties struct {
DatabaseName string
TableName string
ColumnName string
// contains filtered or unexported fields
}
args = [database name, table name, column name]
func NewReadColumnProperties ¶
func NewReadColumnProperties(databaseName, tableName, columnName string) ReadColumnProperties
func (ReadColumnProperties) ResponseOnError ¶
func (ReadColumnProperties) ResponseOnSuccess ¶
type ReadColumnSchema ¶
type ReadColumnSchema struct {
DatabaseName string
TableName string
ColumnName string
// contains filtered or unexported fields
}
args = [database name, table name, column name]
func NewReadColumnSchema ¶
func NewReadColumnSchema(databaseName, tableName, columnName string) ReadColumnSchema
func (ReadColumnSchema) ResponseOnError ¶
func (ReadColumnSchema) ResponseOnSuccess ¶
type ReadCount ¶
type ReadCount struct {
DatabaseName string
TableName string
// contains filtered or unexported fields
}
args = [database name, table name]
func NewReadCount ¶
func NewReadCountWithDB ¶
func (ReadCount) ResponseOnError ¶
func (ReadCount) ResponseOnSuccess ¶
type ReadDatabaseNames ¶
type ReadDatabaseNames struct {
// contains filtered or unexported fields
}
args = [target name]
func NewReadDatabaseNames ¶
func NewReadDatabaseNames() ReadDatabaseNames
func (ReadDatabaseNames) ResponseOnError ¶
func (ReadDatabaseNames) ResponseOnSuccess ¶
type ReadDatabaseProperties ¶
type ReadDatabaseProperties struct {
DatabaseName string
// contains filtered or unexported fields
}
args = [database name]
func NewReadDatabaseProperties ¶
func NewReadDatabaseProperties(databaseName string) ReadDatabaseProperties
func (ReadDatabaseProperties) ResponseOnError ¶
func (ReadDatabaseProperties) ResponseOnSuccess ¶
type ReadDatabaseSchema ¶
type ReadDatabaseSchema struct {
DatabaseName string
// contains filtered or unexported fields
}
args = [database_name]
func NewReadDatabaseSchema ¶
func NewReadDatabaseSchema(databaseName string) ReadDatabaseSchema
func (ReadDatabaseSchema) ResponseOnError ¶
func (ReadDatabaseSchema) ResponseOnSuccess ¶
type ReadTableNames ¶
type ReadTableNames struct {
DatabaseName string
// contains filtered or unexported fields
}
args = [database name]
func NewReadDBTableNames ¶
func NewReadDBTableNames(databaseName string) ReadTableNames
func NewReadTableNames ¶
func NewReadTableNames() ReadTableNames
func (ReadTableNames) ResponseOnError ¶
func (ReadTableNames) ResponseOnSuccess ¶
type ReadTableProperties ¶
type ReadTableProperties struct {
DatabaseName string
TableName string
// contains filtered or unexported fields
}
args = [database name, table name]
func NewReadTableProperties ¶
func NewReadTableProperties(databaseName, tableName string) ReadTableProperties
func (ReadTableProperties) ResponseOnError ¶
func (ReadTableProperties) ResponseOnSuccess ¶
type ReadTableSchema ¶
type ReadTableSchema struct {
DatabaseName string
TableName string
// contains filtered or unexported fields
}
args = [database name, table name]
func NewReadTableSchema ¶
func NewReadTableSchema(databaseName, tableName string) ReadTableSchema
func (ReadTableSchema) ResponseOnError ¶
func (ReadTableSchema) ResponseOnSuccess ¶
type Status ¶
type Status int
const ( SuccessConnect Status SuccessReconnect SuccessDisconnect SuccessTargetOpen SuccessTargetUpdate SuccessTargetClose SuccessReadDatabaseSchema SuccessReadTableSchema SuccessReadColumnSchema SuccessReadDatabaseProperties SuccessReadTableProperties SuccessReadColumnProperties SuccessReadDatabaseList SuccessReadDBTableList SuccessReadDBColumnList SuccessReadCount SuccessCreate SuccessRead SuccessUpdate SuccessDelete SuccessExecute SuccessBatchExecute SuccessChainExecute )
const ( ErrorConnect Status ErrorReconnect ErrorDisconnect ErrorTargetOpen ErrorTargetClose ErrorTargetUpdate ErrorReadDatabaseSchema ErrorReadTableSchema ErrorReadColumnSchema ErrorReadDatabaseProperties ErrorReadTableProperties ErrorReadColumnProperties ErrorReadDatabaseList ErrorReadDBTableList ErrorReadDBColumnList ErrorReadCount ErrorCreate ErrorRead ErrorUpdate ErrorDelete ErrorExecute ErrorBatchExecute ErrorChainExecute )
const StatusUnknown Status = 0