Documentation ¶
Index ¶
- type MockSqlDatabase
- func (_m *MockSqlDatabase) BatchExec(ctx context.Context, batchSize int, statements []string, ...) error
- func (_m *MockSqlDatabase) Close()
- func (_m *MockSqlDatabase) EXPECT() *MockSqlDatabase_Expecter
- func (_m *MockSqlDatabase) Exec(ctx context.Context, statement string) error
- func (_m *MockSqlDatabase) GetCreateTableStatement(ctx context.Context, schema string, table string) (string, error)
- func (_m *MockSqlDatabase) GetDatabaseSchema(ctx context.Context) ([]*sqlmanager_shared.DatabaseSchemaRow, error)
- func (_m *MockSqlDatabase) GetRolePermissionsMap(ctx context.Context) (map[string][]string, error)
- func (_m *MockSqlDatabase) GetSchemaColumnMap(ctx context.Context) (map[string]map[string]*sqlmanager_shared.ColumnInfo, error)
- func (_m *MockSqlDatabase) GetSchemaInitStatements(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.InitSchemaStatements, error)
- func (_m *MockSqlDatabase) GetSchemaTableDataTypes(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) (*sqlmanager_shared.SchemaTableDataTypeResponse, error)
- func (_m *MockSqlDatabase) GetSchemaTableTriggers(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableTrigger, error)
- func (_m *MockSqlDatabase) GetTableConstraintsBySchema(ctx context.Context, schemas []string) (*sqlmanager_shared.TableConstraints, error)
- func (_m *MockSqlDatabase) GetTableInitStatements(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableInitStatement, error)
- func (_m *MockSqlDatabase) GetTableRowCount(ctx context.Context, schema string, table string, whereClause *string) (int64, error)
- type MockSqlDatabase_BatchExec_Call
- func (_c *MockSqlDatabase_BatchExec_Call) Return(_a0 error) *MockSqlDatabase_BatchExec_Call
- func (_c *MockSqlDatabase_BatchExec_Call) Run(run func(ctx context.Context, batchSize int, statements []string, ...)) *MockSqlDatabase_BatchExec_Call
- func (_c *MockSqlDatabase_BatchExec_Call) RunAndReturn(...) *MockSqlDatabase_BatchExec_Call
- type MockSqlDatabase_Close_Call
- type MockSqlDatabase_Exec_Call
- func (_c *MockSqlDatabase_Exec_Call) Return(_a0 error) *MockSqlDatabase_Exec_Call
- func (_c *MockSqlDatabase_Exec_Call) Run(run func(ctx context.Context, statement string)) *MockSqlDatabase_Exec_Call
- func (_c *MockSqlDatabase_Exec_Call) RunAndReturn(run func(context.Context, string) error) *MockSqlDatabase_Exec_Call
- type MockSqlDatabase_Expecter
- func (_e *MockSqlDatabase_Expecter) BatchExec(ctx interface{}, batchSize interface{}, statements interface{}, ...) *MockSqlDatabase_BatchExec_Call
- func (_e *MockSqlDatabase_Expecter) Close() *MockSqlDatabase_Close_Call
- func (_e *MockSqlDatabase_Expecter) Exec(ctx interface{}, statement interface{}) *MockSqlDatabase_Exec_Call
- func (_e *MockSqlDatabase_Expecter) GetCreateTableStatement(ctx interface{}, schema interface{}, table interface{}) *MockSqlDatabase_GetCreateTableStatement_Call
- func (_e *MockSqlDatabase_Expecter) GetDatabaseSchema(ctx interface{}) *MockSqlDatabase_GetDatabaseSchema_Call
- func (_e *MockSqlDatabase_Expecter) GetRolePermissionsMap(ctx interface{}) *MockSqlDatabase_GetRolePermissionsMap_Call
- func (_e *MockSqlDatabase_Expecter) GetSchemaColumnMap(ctx interface{}) *MockSqlDatabase_GetSchemaColumnMap_Call
- func (_e *MockSqlDatabase_Expecter) GetSchemaInitStatements(ctx interface{}, tables interface{}) *MockSqlDatabase_GetSchemaInitStatements_Call
- func (_e *MockSqlDatabase_Expecter) GetSchemaTableDataTypes(ctx interface{}, tables interface{}) *MockSqlDatabase_GetSchemaTableDataTypes_Call
- func (_e *MockSqlDatabase_Expecter) GetSchemaTableTriggers(ctx interface{}, tables interface{}) *MockSqlDatabase_GetSchemaTableTriggers_Call
- func (_e *MockSqlDatabase_Expecter) GetTableConstraintsBySchema(ctx interface{}, schemas interface{}) *MockSqlDatabase_GetTableConstraintsBySchema_Call
- func (_e *MockSqlDatabase_Expecter) GetTableInitStatements(ctx interface{}, tables interface{}) *MockSqlDatabase_GetTableInitStatements_Call
- func (_e *MockSqlDatabase_Expecter) GetTableRowCount(ctx interface{}, schema interface{}, table interface{}, ...) *MockSqlDatabase_GetTableRowCount_Call
- type MockSqlDatabase_GetCreateTableStatement_Call
- func (_c *MockSqlDatabase_GetCreateTableStatement_Call) Return(_a0 string, _a1 error) *MockSqlDatabase_GetCreateTableStatement_Call
- func (_c *MockSqlDatabase_GetCreateTableStatement_Call) Run(run func(ctx context.Context, schema string, table string)) *MockSqlDatabase_GetCreateTableStatement_Call
- func (_c *MockSqlDatabase_GetCreateTableStatement_Call) RunAndReturn(run func(context.Context, string, string) (string, error)) *MockSqlDatabase_GetCreateTableStatement_Call
- type MockSqlDatabase_GetDatabaseSchema_Call
- func (_c *MockSqlDatabase_GetDatabaseSchema_Call) Return(_a0 []*sqlmanager_shared.DatabaseSchemaRow, _a1 error) *MockSqlDatabase_GetDatabaseSchema_Call
- func (_c *MockSqlDatabase_GetDatabaseSchema_Call) Run(run func(ctx context.Context)) *MockSqlDatabase_GetDatabaseSchema_Call
- func (_c *MockSqlDatabase_GetDatabaseSchema_Call) RunAndReturn(run func(context.Context) ([]*sqlmanager_shared.DatabaseSchemaRow, error)) *MockSqlDatabase_GetDatabaseSchema_Call
- type MockSqlDatabase_GetRolePermissionsMap_Call
- func (_c *MockSqlDatabase_GetRolePermissionsMap_Call) Return(_a0 map[string][]string, _a1 error) *MockSqlDatabase_GetRolePermissionsMap_Call
- func (_c *MockSqlDatabase_GetRolePermissionsMap_Call) Run(run func(ctx context.Context)) *MockSqlDatabase_GetRolePermissionsMap_Call
- func (_c *MockSqlDatabase_GetRolePermissionsMap_Call) RunAndReturn(run func(context.Context) (map[string][]string, error)) *MockSqlDatabase_GetRolePermissionsMap_Call
- type MockSqlDatabase_GetSchemaColumnMap_Call
- func (_c *MockSqlDatabase_GetSchemaColumnMap_Call) Return(_a0 map[string]map[string]*sqlmanager_shared.ColumnInfo, _a1 error) *MockSqlDatabase_GetSchemaColumnMap_Call
- func (_c *MockSqlDatabase_GetSchemaColumnMap_Call) Run(run func(ctx context.Context)) *MockSqlDatabase_GetSchemaColumnMap_Call
- func (_c *MockSqlDatabase_GetSchemaColumnMap_Call) RunAndReturn(...) *MockSqlDatabase_GetSchemaColumnMap_Call
- type MockSqlDatabase_GetSchemaInitStatements_Call
- func (_c *MockSqlDatabase_GetSchemaInitStatements_Call) Return(_a0 []*sqlmanager_shared.InitSchemaStatements, _a1 error) *MockSqlDatabase_GetSchemaInitStatements_Call
- func (_c *MockSqlDatabase_GetSchemaInitStatements_Call) Run(run func(ctx context.Context, tables []*sqlmanager_shared.SchemaTable)) *MockSqlDatabase_GetSchemaInitStatements_Call
- func (_c *MockSqlDatabase_GetSchemaInitStatements_Call) RunAndReturn(...) *MockSqlDatabase_GetSchemaInitStatements_Call
- type MockSqlDatabase_GetSchemaTableDataTypes_Call
- func (_c *MockSqlDatabase_GetSchemaTableDataTypes_Call) Return(_a0 *sqlmanager_shared.SchemaTableDataTypeResponse, _a1 error) *MockSqlDatabase_GetSchemaTableDataTypes_Call
- func (_c *MockSqlDatabase_GetSchemaTableDataTypes_Call) Run(run func(ctx context.Context, tables []*sqlmanager_shared.SchemaTable)) *MockSqlDatabase_GetSchemaTableDataTypes_Call
- func (_c *MockSqlDatabase_GetSchemaTableDataTypes_Call) RunAndReturn(...) *MockSqlDatabase_GetSchemaTableDataTypes_Call
- type MockSqlDatabase_GetSchemaTableTriggers_Call
- func (_c *MockSqlDatabase_GetSchemaTableTriggers_Call) Return(_a0 []*sqlmanager_shared.TableTrigger, _a1 error) *MockSqlDatabase_GetSchemaTableTriggers_Call
- func (_c *MockSqlDatabase_GetSchemaTableTriggers_Call) Run(run func(ctx context.Context, tables []*sqlmanager_shared.SchemaTable)) *MockSqlDatabase_GetSchemaTableTriggers_Call
- func (_c *MockSqlDatabase_GetSchemaTableTriggers_Call) RunAndReturn(...) *MockSqlDatabase_GetSchemaTableTriggers_Call
- type MockSqlDatabase_GetTableConstraintsBySchema_Call
- func (_c *MockSqlDatabase_GetTableConstraintsBySchema_Call) Return(_a0 *sqlmanager_shared.TableConstraints, _a1 error) *MockSqlDatabase_GetTableConstraintsBySchema_Call
- func (_c *MockSqlDatabase_GetTableConstraintsBySchema_Call) Run(run func(ctx context.Context, schemas []string)) *MockSqlDatabase_GetTableConstraintsBySchema_Call
- func (_c *MockSqlDatabase_GetTableConstraintsBySchema_Call) RunAndReturn(...) *MockSqlDatabase_GetTableConstraintsBySchema_Call
- type MockSqlDatabase_GetTableInitStatements_Call
- func (_c *MockSqlDatabase_GetTableInitStatements_Call) Return(_a0 []*sqlmanager_shared.TableInitStatement, _a1 error) *MockSqlDatabase_GetTableInitStatements_Call
- func (_c *MockSqlDatabase_GetTableInitStatements_Call) Run(run func(ctx context.Context, tables []*sqlmanager_shared.SchemaTable)) *MockSqlDatabase_GetTableInitStatements_Call
- func (_c *MockSqlDatabase_GetTableInitStatements_Call) RunAndReturn(...) *MockSqlDatabase_GetTableInitStatements_Call
- type MockSqlDatabase_GetTableRowCount_Call
- func (_c *MockSqlDatabase_GetTableRowCount_Call) Return(_a0 int64, _a1 error) *MockSqlDatabase_GetTableRowCount_Call
- func (_c *MockSqlDatabase_GetTableRowCount_Call) Run(...) *MockSqlDatabase_GetTableRowCount_Call
- func (_c *MockSqlDatabase_GetTableRowCount_Call) RunAndReturn(run func(context.Context, string, string, *string) (int64, error)) *MockSqlDatabase_GetTableRowCount_Call
- type MockSqlManagerClient
- func (_m *MockSqlManagerClient) EXPECT() *MockSqlManagerClient_Expecter
- func (_m *MockSqlManagerClient) NewPooledSqlDb(ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection) (*SqlConnection, error)
- func (_m *MockSqlManagerClient) NewSqlDb(ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection, ...) (*SqlConnection, error)
- func (_m *MockSqlManagerClient) NewSqlDbFromConnectionConfig(ctx context.Context, slogger *slog.Logger, ...) (*SqlConnection, error)
- func (_m *MockSqlManagerClient) NewSqlDbFromUrl(ctx context.Context, driver string, connectionUrl string) (*SqlConnection, error)
- type MockSqlManagerClient_Expecter
- func (_e *MockSqlManagerClient_Expecter) NewPooledSqlDb(ctx interface{}, slogger interface{}, connection interface{}) *MockSqlManagerClient_NewPooledSqlDb_Call
- func (_e *MockSqlManagerClient_Expecter) NewSqlDb(ctx interface{}, slogger interface{}, connection interface{}, ...) *MockSqlManagerClient_NewSqlDb_Call
- func (_e *MockSqlManagerClient_Expecter) NewSqlDbFromConnectionConfig(ctx interface{}, slogger interface{}, connectionConfig interface{}, ...) *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call
- func (_e *MockSqlManagerClient_Expecter) NewSqlDbFromUrl(ctx interface{}, driver interface{}, connectionUrl interface{}) *MockSqlManagerClient_NewSqlDbFromUrl_Call
- type MockSqlManagerClient_NewPooledSqlDb_Call
- func (_c *MockSqlManagerClient_NewPooledSqlDb_Call) Return(_a0 *SqlConnection, _a1 error) *MockSqlManagerClient_NewPooledSqlDb_Call
- func (_c *MockSqlManagerClient_NewPooledSqlDb_Call) Run(...) *MockSqlManagerClient_NewPooledSqlDb_Call
- func (_c *MockSqlManagerClient_NewPooledSqlDb_Call) RunAndReturn(...) *MockSqlManagerClient_NewPooledSqlDb_Call
- type MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call
- func (_c *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call) Return(_a0 *SqlConnection, _a1 error) *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call
- func (_c *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call) Run(run func(ctx context.Context, slogger *slog.Logger, ...)) *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call
- func (_c *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call) RunAndReturn(...) *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call
- type MockSqlManagerClient_NewSqlDbFromUrl_Call
- func (_c *MockSqlManagerClient_NewSqlDbFromUrl_Call) Return(_a0 *SqlConnection, _a1 error) *MockSqlManagerClient_NewSqlDbFromUrl_Call
- func (_c *MockSqlManagerClient_NewSqlDbFromUrl_Call) Run(run func(ctx context.Context, driver string, connectionUrl string)) *MockSqlManagerClient_NewSqlDbFromUrl_Call
- func (_c *MockSqlManagerClient_NewSqlDbFromUrl_Call) RunAndReturn(run func(context.Context, string, string) (*SqlConnection, error)) *MockSqlManagerClient_NewSqlDbFromUrl_Call
- type MockSqlManagerClient_NewSqlDb_Call
- func (_c *MockSqlManagerClient_NewSqlDb_Call) Return(_a0 *SqlConnection, _a1 error) *MockSqlManagerClient_NewSqlDb_Call
- func (_c *MockSqlManagerClient_NewSqlDb_Call) Run(...) *MockSqlManagerClient_NewSqlDb_Call
- func (_c *MockSqlManagerClient_NewSqlDb_Call) RunAndReturn(...) *MockSqlManagerClient_NewSqlDb_Call
- type SqlConnection
- type SqlDatabase
- type SqlManager
- func (s *SqlManager) NewPooledSqlDb(ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection) (*SqlConnection, error)
- func (s *SqlManager) NewSqlDb(ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection, ...) (*SqlConnection, error)
- func (s *SqlManager) NewSqlDbFromConnectionConfig(ctx context.Context, slogger *slog.Logger, ...) (*SqlConnection, error)
- func (s *SqlManager) NewSqlDbFromUrl(ctx context.Context, driver, connectionUrl string) (*SqlConnection, error)
- type SqlManagerClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockSqlDatabase ¶
MockSqlDatabase is an autogenerated mock type for the SqlDatabase type
func NewMockSqlDatabase ¶
func NewMockSqlDatabase(t interface { mock.TestingT Cleanup(func()) }) *MockSqlDatabase
NewMockSqlDatabase creates a new instance of MockSqlDatabase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockSqlDatabase) BatchExec ¶
func (_m *MockSqlDatabase) BatchExec(ctx context.Context, batchSize int, statements []string, opts *sqlmanager_shared.BatchExecOpts) error
BatchExec provides a mock function with given fields: ctx, batchSize, statements, opts
func (*MockSqlDatabase) Close ¶
func (_m *MockSqlDatabase) Close()
Close provides a mock function with given fields:
func (*MockSqlDatabase) EXPECT ¶
func (_m *MockSqlDatabase) EXPECT() *MockSqlDatabase_Expecter
func (*MockSqlDatabase) Exec ¶
func (_m *MockSqlDatabase) Exec(ctx context.Context, statement string) error
Exec provides a mock function with given fields: ctx, statement
func (*MockSqlDatabase) GetCreateTableStatement ¶
func (_m *MockSqlDatabase) GetCreateTableStatement(ctx context.Context, schema string, table string) (string, error)
GetCreateTableStatement provides a mock function with given fields: ctx, schema, table
func (*MockSqlDatabase) GetDatabaseSchema ¶
func (_m *MockSqlDatabase) GetDatabaseSchema(ctx context.Context) ([]*sqlmanager_shared.DatabaseSchemaRow, error)
GetDatabaseSchema provides a mock function with given fields: ctx
func (*MockSqlDatabase) GetRolePermissionsMap ¶
GetRolePermissionsMap provides a mock function with given fields: ctx
func (*MockSqlDatabase) GetSchemaColumnMap ¶
func (_m *MockSqlDatabase) GetSchemaColumnMap(ctx context.Context) (map[string]map[string]*sqlmanager_shared.ColumnInfo, error)
GetSchemaColumnMap provides a mock function with given fields: ctx
func (*MockSqlDatabase) GetSchemaInitStatements ¶ added in v0.4.30
func (_m *MockSqlDatabase) GetSchemaInitStatements(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.InitSchemaStatements, error)
GetSchemaInitStatements provides a mock function with given fields: ctx, tables
func (*MockSqlDatabase) GetSchemaTableDataTypes ¶ added in v0.4.25
func (_m *MockSqlDatabase) GetSchemaTableDataTypes(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) (*sqlmanager_shared.SchemaTableDataTypeResponse, error)
GetSchemaTableDataTypes provides a mock function with given fields: ctx, tables
func (*MockSqlDatabase) GetSchemaTableTriggers ¶ added in v0.4.25
func (_m *MockSqlDatabase) GetSchemaTableTriggers(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableTrigger, error)
GetSchemaTableTriggers provides a mock function with given fields: ctx, tables
func (*MockSqlDatabase) GetTableConstraintsBySchema ¶ added in v0.4.23
func (_m *MockSqlDatabase) GetTableConstraintsBySchema(ctx context.Context, schemas []string) (*sqlmanager_shared.TableConstraints, error)
GetTableConstraintsBySchema provides a mock function with given fields: ctx, schemas
func (*MockSqlDatabase) GetTableInitStatements ¶ added in v0.4.24
func (_m *MockSqlDatabase) GetTableInitStatements(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableInitStatement, error)
GetTableInitStatements provides a mock function with given fields: ctx, tables
func (*MockSqlDatabase) GetTableRowCount ¶ added in v0.4.24
func (_m *MockSqlDatabase) GetTableRowCount(ctx context.Context, schema string, table string, whereClause *string) (int64, error)
GetTableRowCount provides a mock function with given fields: ctx, schema, table, whereClause
type MockSqlDatabase_BatchExec_Call ¶
MockSqlDatabase_BatchExec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchExec'
func (*MockSqlDatabase_BatchExec_Call) Return ¶
func (_c *MockSqlDatabase_BatchExec_Call) Return(_a0 error) *MockSqlDatabase_BatchExec_Call
func (*MockSqlDatabase_BatchExec_Call) Run ¶
func (_c *MockSqlDatabase_BatchExec_Call) Run(run func(ctx context.Context, batchSize int, statements []string, opts *sqlmanager_shared.BatchExecOpts)) *MockSqlDatabase_BatchExec_Call
func (*MockSqlDatabase_BatchExec_Call) RunAndReturn ¶
func (_c *MockSqlDatabase_BatchExec_Call) RunAndReturn(run func(context.Context, int, []string, *sqlmanager_shared.BatchExecOpts) error) *MockSqlDatabase_BatchExec_Call
type MockSqlDatabase_Close_Call ¶
MockSqlDatabase_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockSqlDatabase_Close_Call) Return ¶
func (_c *MockSqlDatabase_Close_Call) Return() *MockSqlDatabase_Close_Call
func (*MockSqlDatabase_Close_Call) Run ¶
func (_c *MockSqlDatabase_Close_Call) Run(run func()) *MockSqlDatabase_Close_Call
func (*MockSqlDatabase_Close_Call) RunAndReturn ¶
func (_c *MockSqlDatabase_Close_Call) RunAndReturn(run func()) *MockSqlDatabase_Close_Call
type MockSqlDatabase_Exec_Call ¶
MockSqlDatabase_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'
func (*MockSqlDatabase_Exec_Call) Return ¶
func (_c *MockSqlDatabase_Exec_Call) Return(_a0 error) *MockSqlDatabase_Exec_Call
func (*MockSqlDatabase_Exec_Call) Run ¶
func (_c *MockSqlDatabase_Exec_Call) Run(run func(ctx context.Context, statement string)) *MockSqlDatabase_Exec_Call
func (*MockSqlDatabase_Exec_Call) RunAndReturn ¶
func (_c *MockSqlDatabase_Exec_Call) RunAndReturn(run func(context.Context, string) error) *MockSqlDatabase_Exec_Call
type MockSqlDatabase_Expecter ¶
type MockSqlDatabase_Expecter struct {
// contains filtered or unexported fields
}
func (*MockSqlDatabase_Expecter) BatchExec ¶
func (_e *MockSqlDatabase_Expecter) BatchExec(ctx interface{}, batchSize interface{}, statements interface{}, opts interface{}) *MockSqlDatabase_BatchExec_Call
BatchExec is a helper method to define mock.On call
- ctx context.Context
- batchSize int
- statements []string
- opts *sqlmanager_shared.BatchExecOpts
func (*MockSqlDatabase_Expecter) Close ¶
func (_e *MockSqlDatabase_Expecter) Close() *MockSqlDatabase_Close_Call
Close is a helper method to define mock.On call
func (*MockSqlDatabase_Expecter) Exec ¶
func (_e *MockSqlDatabase_Expecter) Exec(ctx interface{}, statement interface{}) *MockSqlDatabase_Exec_Call
Exec is a helper method to define mock.On call
- ctx context.Context
- statement string
func (*MockSqlDatabase_Expecter) GetCreateTableStatement ¶
func (_e *MockSqlDatabase_Expecter) GetCreateTableStatement(ctx interface{}, schema interface{}, table interface{}) *MockSqlDatabase_GetCreateTableStatement_Call
GetCreateTableStatement is a helper method to define mock.On call
- ctx context.Context
- schema string
- table string
func (*MockSqlDatabase_Expecter) GetDatabaseSchema ¶
func (_e *MockSqlDatabase_Expecter) GetDatabaseSchema(ctx interface{}) *MockSqlDatabase_GetDatabaseSchema_Call
GetDatabaseSchema is a helper method to define mock.On call
- ctx context.Context
func (*MockSqlDatabase_Expecter) GetRolePermissionsMap ¶
func (_e *MockSqlDatabase_Expecter) GetRolePermissionsMap(ctx interface{}) *MockSqlDatabase_GetRolePermissionsMap_Call
GetRolePermissionsMap is a helper method to define mock.On call
- ctx context.Context
func (*MockSqlDatabase_Expecter) GetSchemaColumnMap ¶
func (_e *MockSqlDatabase_Expecter) GetSchemaColumnMap(ctx interface{}) *MockSqlDatabase_GetSchemaColumnMap_Call
GetSchemaColumnMap is a helper method to define mock.On call
- ctx context.Context
func (*MockSqlDatabase_Expecter) GetSchemaInitStatements ¶ added in v0.4.30
func (_e *MockSqlDatabase_Expecter) GetSchemaInitStatements(ctx interface{}, tables interface{}) *MockSqlDatabase_GetSchemaInitStatements_Call
GetSchemaInitStatements is a helper method to define mock.On call
- ctx context.Context
- tables []*sqlmanager_shared.SchemaTable
func (*MockSqlDatabase_Expecter) GetSchemaTableDataTypes ¶ added in v0.4.25
func (_e *MockSqlDatabase_Expecter) GetSchemaTableDataTypes(ctx interface{}, tables interface{}) *MockSqlDatabase_GetSchemaTableDataTypes_Call
GetSchemaTableDataTypes is a helper method to define mock.On call
- ctx context.Context
- tables []*sqlmanager_shared.SchemaTable
func (*MockSqlDatabase_Expecter) GetSchemaTableTriggers ¶ added in v0.4.25
func (_e *MockSqlDatabase_Expecter) GetSchemaTableTriggers(ctx interface{}, tables interface{}) *MockSqlDatabase_GetSchemaTableTriggers_Call
GetSchemaTableTriggers is a helper method to define mock.On call
- ctx context.Context
- tables []*sqlmanager_shared.SchemaTable
func (*MockSqlDatabase_Expecter) GetTableConstraintsBySchema ¶ added in v0.4.23
func (_e *MockSqlDatabase_Expecter) GetTableConstraintsBySchema(ctx interface{}, schemas interface{}) *MockSqlDatabase_GetTableConstraintsBySchema_Call
GetTableConstraintsBySchema is a helper method to define mock.On call
- ctx context.Context
- schemas []string
func (*MockSqlDatabase_Expecter) GetTableInitStatements ¶ added in v0.4.24
func (_e *MockSqlDatabase_Expecter) GetTableInitStatements(ctx interface{}, tables interface{}) *MockSqlDatabase_GetTableInitStatements_Call
GetTableInitStatements is a helper method to define mock.On call
- ctx context.Context
- tables []*sqlmanager_shared.SchemaTable
func (*MockSqlDatabase_Expecter) GetTableRowCount ¶ added in v0.4.24
func (_e *MockSqlDatabase_Expecter) GetTableRowCount(ctx interface{}, schema interface{}, table interface{}, whereClause interface{}) *MockSqlDatabase_GetTableRowCount_Call
GetTableRowCount is a helper method to define mock.On call
- ctx context.Context
- schema string
- table string
- whereClause *string
type MockSqlDatabase_GetCreateTableStatement_Call ¶
MockSqlDatabase_GetCreateTableStatement_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCreateTableStatement'
func (*MockSqlDatabase_GetCreateTableStatement_Call) Return ¶
func (_c *MockSqlDatabase_GetCreateTableStatement_Call) Return(_a0 string, _a1 error) *MockSqlDatabase_GetCreateTableStatement_Call
func (*MockSqlDatabase_GetCreateTableStatement_Call) Run ¶
func (_c *MockSqlDatabase_GetCreateTableStatement_Call) Run(run func(ctx context.Context, schema string, table string)) *MockSqlDatabase_GetCreateTableStatement_Call
func (*MockSqlDatabase_GetCreateTableStatement_Call) RunAndReturn ¶
func (_c *MockSqlDatabase_GetCreateTableStatement_Call) RunAndReturn(run func(context.Context, string, string) (string, error)) *MockSqlDatabase_GetCreateTableStatement_Call
type MockSqlDatabase_GetDatabaseSchema_Call ¶
MockSqlDatabase_GetDatabaseSchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDatabaseSchema'
func (*MockSqlDatabase_GetDatabaseSchema_Call) Return ¶
func (_c *MockSqlDatabase_GetDatabaseSchema_Call) Return(_a0 []*sqlmanager_shared.DatabaseSchemaRow, _a1 error) *MockSqlDatabase_GetDatabaseSchema_Call
func (*MockSqlDatabase_GetDatabaseSchema_Call) Run ¶
func (_c *MockSqlDatabase_GetDatabaseSchema_Call) Run(run func(ctx context.Context)) *MockSqlDatabase_GetDatabaseSchema_Call
func (*MockSqlDatabase_GetDatabaseSchema_Call) RunAndReturn ¶
func (_c *MockSqlDatabase_GetDatabaseSchema_Call) RunAndReturn(run func(context.Context) ([]*sqlmanager_shared.DatabaseSchemaRow, error)) *MockSqlDatabase_GetDatabaseSchema_Call
type MockSqlDatabase_GetRolePermissionsMap_Call ¶
MockSqlDatabase_GetRolePermissionsMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRolePermissionsMap'
func (*MockSqlDatabase_GetRolePermissionsMap_Call) Return ¶
func (_c *MockSqlDatabase_GetRolePermissionsMap_Call) Return(_a0 map[string][]string, _a1 error) *MockSqlDatabase_GetRolePermissionsMap_Call
func (*MockSqlDatabase_GetRolePermissionsMap_Call) Run ¶
func (_c *MockSqlDatabase_GetRolePermissionsMap_Call) Run(run func(ctx context.Context)) *MockSqlDatabase_GetRolePermissionsMap_Call
func (*MockSqlDatabase_GetRolePermissionsMap_Call) RunAndReturn ¶
func (_c *MockSqlDatabase_GetRolePermissionsMap_Call) RunAndReturn(run func(context.Context) (map[string][]string, error)) *MockSqlDatabase_GetRolePermissionsMap_Call
type MockSqlDatabase_GetSchemaColumnMap_Call ¶
MockSqlDatabase_GetSchemaColumnMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSchemaColumnMap'
func (*MockSqlDatabase_GetSchemaColumnMap_Call) Return ¶
func (_c *MockSqlDatabase_GetSchemaColumnMap_Call) Return(_a0 map[string]map[string]*sqlmanager_shared.ColumnInfo, _a1 error) *MockSqlDatabase_GetSchemaColumnMap_Call
func (*MockSqlDatabase_GetSchemaColumnMap_Call) Run ¶
func (_c *MockSqlDatabase_GetSchemaColumnMap_Call) Run(run func(ctx context.Context)) *MockSqlDatabase_GetSchemaColumnMap_Call
func (*MockSqlDatabase_GetSchemaColumnMap_Call) RunAndReturn ¶
func (_c *MockSqlDatabase_GetSchemaColumnMap_Call) RunAndReturn(run func(context.Context) (map[string]map[string]*sqlmanager_shared.ColumnInfo, error)) *MockSqlDatabase_GetSchemaColumnMap_Call
type MockSqlDatabase_GetSchemaInitStatements_Call ¶ added in v0.4.30
MockSqlDatabase_GetSchemaInitStatements_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSchemaInitStatements'
func (*MockSqlDatabase_GetSchemaInitStatements_Call) Return ¶ added in v0.4.30
func (_c *MockSqlDatabase_GetSchemaInitStatements_Call) Return(_a0 []*sqlmanager_shared.InitSchemaStatements, _a1 error) *MockSqlDatabase_GetSchemaInitStatements_Call
func (*MockSqlDatabase_GetSchemaInitStatements_Call) Run ¶ added in v0.4.30
func (_c *MockSqlDatabase_GetSchemaInitStatements_Call) Run(run func(ctx context.Context, tables []*sqlmanager_shared.SchemaTable)) *MockSqlDatabase_GetSchemaInitStatements_Call
func (*MockSqlDatabase_GetSchemaInitStatements_Call) RunAndReturn ¶ added in v0.4.30
func (_c *MockSqlDatabase_GetSchemaInitStatements_Call) RunAndReturn(run func(context.Context, []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.InitSchemaStatements, error)) *MockSqlDatabase_GetSchemaInitStatements_Call
type MockSqlDatabase_GetSchemaTableDataTypes_Call ¶ added in v0.4.25
MockSqlDatabase_GetSchemaTableDataTypes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSchemaTableDataTypes'
func (*MockSqlDatabase_GetSchemaTableDataTypes_Call) Run ¶ added in v0.4.25
func (_c *MockSqlDatabase_GetSchemaTableDataTypes_Call) Run(run func(ctx context.Context, tables []*sqlmanager_shared.SchemaTable)) *MockSqlDatabase_GetSchemaTableDataTypes_Call
func (*MockSqlDatabase_GetSchemaTableDataTypes_Call) RunAndReturn ¶ added in v0.4.25
func (_c *MockSqlDatabase_GetSchemaTableDataTypes_Call) RunAndReturn(run func(context.Context, []*sqlmanager_shared.SchemaTable) (*sqlmanager_shared.SchemaTableDataTypeResponse, error)) *MockSqlDatabase_GetSchemaTableDataTypes_Call
type MockSqlDatabase_GetSchemaTableTriggers_Call ¶ added in v0.4.25
MockSqlDatabase_GetSchemaTableTriggers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSchemaTableTriggers'
func (*MockSqlDatabase_GetSchemaTableTriggers_Call) Return ¶ added in v0.4.25
func (_c *MockSqlDatabase_GetSchemaTableTriggers_Call) Return(_a0 []*sqlmanager_shared.TableTrigger, _a1 error) *MockSqlDatabase_GetSchemaTableTriggers_Call
func (*MockSqlDatabase_GetSchemaTableTriggers_Call) Run ¶ added in v0.4.25
func (_c *MockSqlDatabase_GetSchemaTableTriggers_Call) Run(run func(ctx context.Context, tables []*sqlmanager_shared.SchemaTable)) *MockSqlDatabase_GetSchemaTableTriggers_Call
func (*MockSqlDatabase_GetSchemaTableTriggers_Call) RunAndReturn ¶ added in v0.4.25
func (_c *MockSqlDatabase_GetSchemaTableTriggers_Call) RunAndReturn(run func(context.Context, []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableTrigger, error)) *MockSqlDatabase_GetSchemaTableTriggers_Call
type MockSqlDatabase_GetTableConstraintsBySchema_Call ¶ added in v0.4.23
MockSqlDatabase_GetTableConstraintsBySchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTableConstraintsBySchema'
func (*MockSqlDatabase_GetTableConstraintsBySchema_Call) Return ¶ added in v0.4.23
func (_c *MockSqlDatabase_GetTableConstraintsBySchema_Call) Return(_a0 *sqlmanager_shared.TableConstraints, _a1 error) *MockSqlDatabase_GetTableConstraintsBySchema_Call
func (*MockSqlDatabase_GetTableConstraintsBySchema_Call) Run ¶ added in v0.4.23
func (_c *MockSqlDatabase_GetTableConstraintsBySchema_Call) Run(run func(ctx context.Context, schemas []string)) *MockSqlDatabase_GetTableConstraintsBySchema_Call
func (*MockSqlDatabase_GetTableConstraintsBySchema_Call) RunAndReturn ¶ added in v0.4.23
func (_c *MockSqlDatabase_GetTableConstraintsBySchema_Call) RunAndReturn(run func(context.Context, []string) (*sqlmanager_shared.TableConstraints, error)) *MockSqlDatabase_GetTableConstraintsBySchema_Call
type MockSqlDatabase_GetTableInitStatements_Call ¶ added in v0.4.24
MockSqlDatabase_GetTableInitStatements_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTableInitStatements'
func (*MockSqlDatabase_GetTableInitStatements_Call) Return ¶ added in v0.4.24
func (_c *MockSqlDatabase_GetTableInitStatements_Call) Return(_a0 []*sqlmanager_shared.TableInitStatement, _a1 error) *MockSqlDatabase_GetTableInitStatements_Call
func (*MockSqlDatabase_GetTableInitStatements_Call) Run ¶ added in v0.4.24
func (_c *MockSqlDatabase_GetTableInitStatements_Call) Run(run func(ctx context.Context, tables []*sqlmanager_shared.SchemaTable)) *MockSqlDatabase_GetTableInitStatements_Call
func (*MockSqlDatabase_GetTableInitStatements_Call) RunAndReturn ¶ added in v0.4.24
func (_c *MockSqlDatabase_GetTableInitStatements_Call) RunAndReturn(run func(context.Context, []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableInitStatement, error)) *MockSqlDatabase_GetTableInitStatements_Call
type MockSqlDatabase_GetTableRowCount_Call ¶ added in v0.4.24
MockSqlDatabase_GetTableRowCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTableRowCount'
func (*MockSqlDatabase_GetTableRowCount_Call) Return ¶ added in v0.4.24
func (_c *MockSqlDatabase_GetTableRowCount_Call) Return(_a0 int64, _a1 error) *MockSqlDatabase_GetTableRowCount_Call
func (*MockSqlDatabase_GetTableRowCount_Call) Run ¶ added in v0.4.24
func (_c *MockSqlDatabase_GetTableRowCount_Call) Run(run func(ctx context.Context, schema string, table string, whereClause *string)) *MockSqlDatabase_GetTableRowCount_Call
func (*MockSqlDatabase_GetTableRowCount_Call) RunAndReturn ¶ added in v0.4.24
func (_c *MockSqlDatabase_GetTableRowCount_Call) RunAndReturn(run func(context.Context, string, string, *string) (int64, error)) *MockSqlDatabase_GetTableRowCount_Call
type MockSqlManagerClient ¶
MockSqlManagerClient is an autogenerated mock type for the SqlManagerClient type
func NewMockSqlManagerClient ¶
func NewMockSqlManagerClient(t interface { mock.TestingT Cleanup(func()) }) *MockSqlManagerClient
NewMockSqlManagerClient creates a new instance of MockSqlManagerClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockSqlManagerClient) EXPECT ¶
func (_m *MockSqlManagerClient) EXPECT() *MockSqlManagerClient_Expecter
func (*MockSqlManagerClient) NewPooledSqlDb ¶
func (_m *MockSqlManagerClient) NewPooledSqlDb(ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection) (*SqlConnection, error)
NewPooledSqlDb provides a mock function with given fields: ctx, slogger, connection
func (*MockSqlManagerClient) NewSqlDb ¶
func (_m *MockSqlManagerClient) NewSqlDb(ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection, connectionTimeout *int) (*SqlConnection, error)
NewSqlDb provides a mock function with given fields: ctx, slogger, connection, connectionTimeout
func (*MockSqlManagerClient) NewSqlDbFromConnectionConfig ¶
func (_m *MockSqlManagerClient) NewSqlDbFromConnectionConfig(ctx context.Context, slogger *slog.Logger, connectionConfig *mgmtv1alpha1.ConnectionConfig, connectionTimeout *int) (*SqlConnection, error)
NewSqlDbFromConnectionConfig provides a mock function with given fields: ctx, slogger, connectionConfig, connectionTimeout
func (*MockSqlManagerClient) NewSqlDbFromUrl ¶
func (_m *MockSqlManagerClient) NewSqlDbFromUrl(ctx context.Context, driver string, connectionUrl string) (*SqlConnection, error)
NewSqlDbFromUrl provides a mock function with given fields: ctx, driver, connectionUrl
type MockSqlManagerClient_Expecter ¶
type MockSqlManagerClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockSqlManagerClient_Expecter) NewPooledSqlDb ¶
func (_e *MockSqlManagerClient_Expecter) NewPooledSqlDb(ctx interface{}, slogger interface{}, connection interface{}) *MockSqlManagerClient_NewPooledSqlDb_Call
NewPooledSqlDb is a helper method to define mock.On call
- ctx context.Context
- slogger *slog.Logger
- connection *mgmtv1alpha1.Connection
func (*MockSqlManagerClient_Expecter) NewSqlDb ¶
func (_e *MockSqlManagerClient_Expecter) NewSqlDb(ctx interface{}, slogger interface{}, connection interface{}, connectionTimeout interface{}) *MockSqlManagerClient_NewSqlDb_Call
NewSqlDb is a helper method to define mock.On call
- ctx context.Context
- slogger *slog.Logger
- connection *mgmtv1alpha1.Connection
- connectionTimeout *int
func (*MockSqlManagerClient_Expecter) NewSqlDbFromConnectionConfig ¶
func (_e *MockSqlManagerClient_Expecter) NewSqlDbFromConnectionConfig(ctx interface{}, slogger interface{}, connectionConfig interface{}, connectionTimeout interface{}) *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call
NewSqlDbFromConnectionConfig is a helper method to define mock.On call
- ctx context.Context
- slogger *slog.Logger
- connectionConfig *mgmtv1alpha1.ConnectionConfig
- connectionTimeout *int
func (*MockSqlManagerClient_Expecter) NewSqlDbFromUrl ¶
func (_e *MockSqlManagerClient_Expecter) NewSqlDbFromUrl(ctx interface{}, driver interface{}, connectionUrl interface{}) *MockSqlManagerClient_NewSqlDbFromUrl_Call
NewSqlDbFromUrl is a helper method to define mock.On call
- ctx context.Context
- driver string
- connectionUrl string
type MockSqlManagerClient_NewPooledSqlDb_Call ¶
MockSqlManagerClient_NewPooledSqlDb_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewPooledSqlDb'
func (*MockSqlManagerClient_NewPooledSqlDb_Call) Return ¶
func (_c *MockSqlManagerClient_NewPooledSqlDb_Call) Return(_a0 *SqlConnection, _a1 error) *MockSqlManagerClient_NewPooledSqlDb_Call
func (*MockSqlManagerClient_NewPooledSqlDb_Call) Run ¶
func (_c *MockSqlManagerClient_NewPooledSqlDb_Call) Run(run func(ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection)) *MockSqlManagerClient_NewPooledSqlDb_Call
func (*MockSqlManagerClient_NewPooledSqlDb_Call) RunAndReturn ¶
func (_c *MockSqlManagerClient_NewPooledSqlDb_Call) RunAndReturn(run func(context.Context, *slog.Logger, *mgmtv1alpha1.Connection) (*SqlConnection, error)) *MockSqlManagerClient_NewPooledSqlDb_Call
type MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call ¶
MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewSqlDbFromConnectionConfig'
func (*MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call) Return ¶
func (_c *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call) Return(_a0 *SqlConnection, _a1 error) *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call
func (*MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call) Run ¶
func (_c *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call) Run(run func(ctx context.Context, slogger *slog.Logger, connectionConfig *mgmtv1alpha1.ConnectionConfig, connectionTimeout *int)) *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call
func (*MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call) RunAndReturn ¶
func (_c *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call) RunAndReturn(run func(context.Context, *slog.Logger, *mgmtv1alpha1.ConnectionConfig, *int) (*SqlConnection, error)) *MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call
type MockSqlManagerClient_NewSqlDbFromUrl_Call ¶
MockSqlManagerClient_NewSqlDbFromUrl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewSqlDbFromUrl'
func (*MockSqlManagerClient_NewSqlDbFromUrl_Call) Return ¶
func (_c *MockSqlManagerClient_NewSqlDbFromUrl_Call) Return(_a0 *SqlConnection, _a1 error) *MockSqlManagerClient_NewSqlDbFromUrl_Call
func (*MockSqlManagerClient_NewSqlDbFromUrl_Call) Run ¶
func (_c *MockSqlManagerClient_NewSqlDbFromUrl_Call) Run(run func(ctx context.Context, driver string, connectionUrl string)) *MockSqlManagerClient_NewSqlDbFromUrl_Call
func (*MockSqlManagerClient_NewSqlDbFromUrl_Call) RunAndReturn ¶
func (_c *MockSqlManagerClient_NewSqlDbFromUrl_Call) RunAndReturn(run func(context.Context, string, string) (*SqlConnection, error)) *MockSqlManagerClient_NewSqlDbFromUrl_Call
type MockSqlManagerClient_NewSqlDb_Call ¶
MockSqlManagerClient_NewSqlDb_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewSqlDb'
func (*MockSqlManagerClient_NewSqlDb_Call) Return ¶
func (_c *MockSqlManagerClient_NewSqlDb_Call) Return(_a0 *SqlConnection, _a1 error) *MockSqlManagerClient_NewSqlDb_Call
func (*MockSqlManagerClient_NewSqlDb_Call) Run ¶
func (_c *MockSqlManagerClient_NewSqlDb_Call) Run(run func(ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection, connectionTimeout *int)) *MockSqlManagerClient_NewSqlDb_Call
func (*MockSqlManagerClient_NewSqlDb_Call) RunAndReturn ¶
func (_c *MockSqlManagerClient_NewSqlDb_Call) RunAndReturn(run func(context.Context, *slog.Logger, *mgmtv1alpha1.Connection, *int) (*SqlConnection, error)) *MockSqlManagerClient_NewSqlDb_Call
type SqlConnection ¶
type SqlConnection struct { Db SqlDatabase Driver string }
type SqlDatabase ¶
type SqlDatabase interface { GetDatabaseSchema(ctx context.Context) ([]*sqlmanager_shared.DatabaseSchemaRow, error) GetSchemaColumnMap(ctx context.Context) (map[string]map[string]*sqlmanager_shared.ColumnInfo, error) // ex: {public.users: { id: struct{}{}, created_at: struct{}{}}} GetTableConstraintsBySchema(ctx context.Context, schemas []string) (*sqlmanager_shared.TableConstraints, error) GetCreateTableStatement(ctx context.Context, schema, table string) (string, error) GetTableInitStatements(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableInitStatement, error) GetRolePermissionsMap(ctx context.Context) (map[string][]string, error) GetTableRowCount(ctx context.Context, schema, table string, whereClause *string) (int64, error) GetSchemaTableDataTypes(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) (*sqlmanager_shared.SchemaTableDataTypeResponse, error) GetSchemaTableTriggers(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableTrigger, error) GetSchemaInitStatements(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.InitSchemaStatements, error) BatchExec(ctx context.Context, batchSize int, statements []string, opts *sqlmanager_shared.BatchExecOpts) error Exec(ctx context.Context, statement string) error Close() }
type SqlManager ¶
type SqlManager struct {
// contains filtered or unexported fields
}
func NewSqlManager ¶
func NewSqlManager( pgpool *sync.Map, pgquerier pg_queries.Querier, mysqlpool *sync.Map, mysqlquerier mysql_queries.Querier, sqlconnector sqlconnect.SqlConnector, ) *SqlManager
func (*SqlManager) NewPooledSqlDb ¶
func (s *SqlManager) NewPooledSqlDb( ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection, ) (*SqlConnection, error)
func (*SqlManager) NewSqlDb ¶
func (s *SqlManager) NewSqlDb( ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection, connectionTimeout *int, ) (*SqlConnection, error)
func (*SqlManager) NewSqlDbFromConnectionConfig ¶
func (s *SqlManager) NewSqlDbFromConnectionConfig( ctx context.Context, slogger *slog.Logger, connectionConfig *mgmtv1alpha1.ConnectionConfig, connectionTimeout *int, ) (*SqlConnection, error)
func (*SqlManager) NewSqlDbFromUrl ¶
func (s *SqlManager) NewSqlDbFromUrl( ctx context.Context, driver, connectionUrl string, ) (*SqlConnection, error)
type SqlManagerClient ¶
type SqlManagerClient interface { NewPooledSqlDb( ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection, ) (*SqlConnection, error) NewSqlDb( ctx context.Context, slogger *slog.Logger, connection *mgmtv1alpha1.Connection, connectionTimeout *int, ) (*SqlConnection, error) NewSqlDbFromUrl( ctx context.Context, driver, connectionUrl string, ) (*SqlConnection, error) NewSqlDbFromConnectionConfig( ctx context.Context, slogger *slog.Logger, connectionConfig *mgmtv1alpha1.ConnectionConfig, connectionTimeout *int, ) (*SqlConnection, error) }