sqlmanager

package
v0.4.62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 21 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockSqlDatabase

type MockSqlDatabase struct {
	mock.Mock
}

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 (*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

func (_m *MockSqlDatabase) GetRolePermissionsMap(ctx context.Context) (map[string][]string, error)

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

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

type MockSqlDatabase_BatchExec_Call struct {
	*mock.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 (*MockSqlDatabase_BatchExec_Call) Run

func (*MockSqlDatabase_BatchExec_Call) RunAndReturn

type MockSqlDatabase_Close_Call

type MockSqlDatabase_Close_Call struct {
	*mock.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 (*MockSqlDatabase_Close_Call) Run

func (*MockSqlDatabase_Close_Call) RunAndReturn

func (_c *MockSqlDatabase_Close_Call) RunAndReturn(run func()) *MockSqlDatabase_Close_Call

type MockSqlDatabase_Exec_Call

type MockSqlDatabase_Exec_Call struct {
	*mock.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 (*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

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

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

type MockSqlDatabase_GetCreateTableStatement_Call struct {
	*mock.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 (*MockSqlDatabase_GetCreateTableStatement_Call) Run

func (*MockSqlDatabase_GetCreateTableStatement_Call) RunAndReturn

type MockSqlDatabase_GetDatabaseSchema_Call

type MockSqlDatabase_GetDatabaseSchema_Call struct {
	*mock.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 (*MockSqlDatabase_GetDatabaseSchema_Call) Run

func (*MockSqlDatabase_GetDatabaseSchema_Call) RunAndReturn

type MockSqlDatabase_GetRolePermissionsMap_Call

type MockSqlDatabase_GetRolePermissionsMap_Call struct {
	*mock.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 (*MockSqlDatabase_GetRolePermissionsMap_Call) Run

func (*MockSqlDatabase_GetRolePermissionsMap_Call) RunAndReturn

type MockSqlDatabase_GetSchemaColumnMap_Call

type MockSqlDatabase_GetSchemaColumnMap_Call struct {
	*mock.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 (*MockSqlDatabase_GetSchemaColumnMap_Call) Run

func (*MockSqlDatabase_GetSchemaColumnMap_Call) RunAndReturn

type MockSqlDatabase_GetSchemaInitStatements_Call added in v0.4.30

type MockSqlDatabase_GetSchemaInitStatements_Call struct {
	*mock.Call
}

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 (*MockSqlDatabase_GetSchemaInitStatements_Call) Run added in v0.4.30

func (*MockSqlDatabase_GetSchemaInitStatements_Call) RunAndReturn added in v0.4.30

type MockSqlDatabase_GetSchemaTableDataTypes_Call added in v0.4.25

type MockSqlDatabase_GetSchemaTableDataTypes_Call struct {
	*mock.Call
}

MockSqlDatabase_GetSchemaTableDataTypes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSchemaTableDataTypes'

func (*MockSqlDatabase_GetSchemaTableDataTypes_Call) Return added in v0.4.25

func (*MockSqlDatabase_GetSchemaTableDataTypes_Call) Run added in v0.4.25

type MockSqlDatabase_GetSchemaTableTriggers_Call added in v0.4.25

type MockSqlDatabase_GetSchemaTableTriggers_Call struct {
	*mock.Call
}

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 (*MockSqlDatabase_GetSchemaTableTriggers_Call) Run added in v0.4.25

func (*MockSqlDatabase_GetSchemaTableTriggers_Call) RunAndReturn added in v0.4.25

type MockSqlDatabase_GetTableConstraintsBySchema_Call added in v0.4.23

type MockSqlDatabase_GetTableConstraintsBySchema_Call struct {
	*mock.Call
}

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 (*MockSqlDatabase_GetTableConstraintsBySchema_Call) Run added in v0.4.23

func (*MockSqlDatabase_GetTableConstraintsBySchema_Call) RunAndReturn added in v0.4.23

type MockSqlDatabase_GetTableInitStatements_Call added in v0.4.24

type MockSqlDatabase_GetTableInitStatements_Call struct {
	*mock.Call
}

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 (*MockSqlDatabase_GetTableInitStatements_Call) Run added in v0.4.24

func (*MockSqlDatabase_GetTableInitStatements_Call) RunAndReturn added in v0.4.24

type MockSqlDatabase_GetTableRowCount_Call added in v0.4.24

type MockSqlDatabase_GetTableRowCount_Call struct {
	*mock.Call
}

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 (*MockSqlDatabase_GetTableRowCount_Call) Run added in v0.4.24

func (*MockSqlDatabase_GetTableRowCount_Call) RunAndReturn added in v0.4.24

type MockSqlManagerClient

type MockSqlManagerClient struct {
	mock.Mock
}

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 (*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

type MockSqlManagerClient_NewPooledSqlDb_Call struct {
	*mock.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 (*MockSqlManagerClient_NewPooledSqlDb_Call) Run

func (*MockSqlManagerClient_NewPooledSqlDb_Call) RunAndReturn

type MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call

type MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call struct {
	*mock.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 (*MockSqlManagerClient_NewSqlDbFromConnectionConfig_Call) Run

type MockSqlManagerClient_NewSqlDbFromUrl_Call

type MockSqlManagerClient_NewSqlDbFromUrl_Call struct {
	*mock.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 (*MockSqlManagerClient_NewSqlDbFromUrl_Call) Run

func (*MockSqlManagerClient_NewSqlDbFromUrl_Call) RunAndReturn

type MockSqlManagerClient_NewSqlDb_Call

type MockSqlManagerClient_NewSqlDb_Call struct {
	*mock.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 (*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

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,
	mssqlpool *sync.Map,
	mssqlquerier mssql_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)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL