Documentation
¶
Index ¶
- func NewSQLiteMigrator(db *sql.DB, sqliteDB *SQLiteDB) types.DatabaseMigrator
- func NewSQLiteRawQuery(driver *SQLiteDB, sql string, args ...any) types.RawQuery
- type SQLiteCapabilities
- func (c *SQLiteCapabilities) GetBooleanLiteral(value bool) string
- func (c *SQLiteCapabilities) GetDriverType() types.DriverType
- func (c *SQLiteCapabilities) GetNullsOrderingSQL(direction types.Order, nullsFirst bool) string
- func (c *SQLiteCapabilities) GetPlaceholder(index int) string
- func (c *SQLiteCapabilities) GetSupportedSchemes() []string
- func (c *SQLiteCapabilities) IsNoSQL() bool
- func (c *SQLiteCapabilities) IsSystemIndex(indexName string) bool
- func (c *SQLiteCapabilities) IsSystemTable(tableName string) bool
- func (c *SQLiteCapabilities) NeedsTypeConversion() bool
- func (c *SQLiteCapabilities) QuoteIdentifier(name string) string
- func (c *SQLiteCapabilities) RequiresLimitForOffset() bool
- func (c *SQLiteCapabilities) SupportsAggregationPipeline() bool
- func (c *SQLiteCapabilities) SupportsArrayFields() bool
- func (c *SQLiteCapabilities) SupportsDefaultValues() bool
- func (c *SQLiteCapabilities) SupportsDistinctOn() bool
- func (c *SQLiteCapabilities) SupportsForeignKeys() bool
- func (c *SQLiteCapabilities) SupportsNestedDocuments() bool
- func (c *SQLiteCapabilities) SupportsReturning() bool
- func (c *SQLiteCapabilities) SupportsTransactions() bool
- type SQLiteDB
- func (s *SQLiteDB) Begin(ctx context.Context) (types.Transaction, error)
- func (s *SQLiteDB) Connect(ctx context.Context) error
- func (s *SQLiteDB) CreateModel(ctx context.Context, modelName string) error
- func (s *SQLiteDB) DropModel(ctx context.Context, modelName string) error
- func (s *SQLiteDB) GetCapabilities() types.DriverCapabilities
- func (s *SQLiteDB) GetDriverType() string
- func (s *SQLiteDB) GetMigrator() types.DatabaseMigrator
- func (s *SQLiteDB) Model(modelName string) types.ModelQuery
- func (s *SQLiteDB) Raw(sql string, args ...any) types.RawQuery
- func (s *SQLiteDB) SyncSchemas(ctx context.Context) error
- func (s *SQLiteDB) Transaction(ctx context.Context, fn func(tx types.Transaction) error) error
- type SQLiteMigrator
- func (m *SQLiteMigrator) ApplyMigration(sql string) error
- func (m *SQLiteMigrator) ConvertFieldToColumnInfo(field schema.Field) *types.ColumnInfo
- func (m *SQLiteMigrator) FormatDefaultValue(value any) string
- func (m *SQLiteMigrator) GenerateAddColumnSQL(tableName string, field any) (string, error)
- func (m *SQLiteMigrator) GenerateColumnDefinitionFromColumnInfo(col types.ColumnInfo) string
- func (m *SQLiteMigrator) GenerateCreateIndexSQL(tableName, indexName string, columns []string, unique bool) string
- func (m *SQLiteMigrator) GenerateCreateTableSQL(s *schema.Schema) (string, error)
- func (m *SQLiteMigrator) GenerateDropColumnSQL(tableName, columnName string) ([]string, error)
- func (m *SQLiteMigrator) GenerateDropIndexSQL(indexName string) string
- func (m *SQLiteMigrator) GenerateDropTableSQL(tableName string) string
- func (m *SQLiteMigrator) GenerateModifyColumnSQL(change types.ColumnChange) ([]string, error)
- func (m *SQLiteMigrator) GetDatabaseType() string
- func (m *SQLiteMigrator) GetTableInfo(tableName string) (*types.TableInfo, error)
- func (m *SQLiteMigrator) GetTables() ([]string, error)
- func (m *SQLiteMigrator) IsPrimaryKeyIndex(indexName string) bool
- func (m *SQLiteMigrator) IsSystemIndex(indexName string) bool
- func (m *SQLiteMigrator) IsSystemTable(tableName string) bool
- func (m *SQLiteMigrator) MapDatabaseTypeToFieldType(dbType string) schema.FieldType
- func (m *SQLiteMigrator) MapFieldType(field schema.Field) string
- func (m *SQLiteMigrator) NormalizeDefaultToPrismaFunction(value any, fieldType schema.FieldType) (string, bool)
- func (m *SQLiteMigrator) ParseDefaultValue(value any, fieldType schema.FieldType) any
- type SQLiteMigratorWrapper
- func (w *SQLiteMigratorWrapper) CompareSchema(existingTable *types.TableInfo, desiredSchema any) (*types.MigrationPlan, error)
- func (w *SQLiteMigratorWrapper) GenerateAddColumnSQL(tableName string, field any) (string, error)
- func (w *SQLiteMigratorWrapper) GenerateCreateTableSQL(schemaInterface any) (string, error)
- func (w *SQLiteMigratorWrapper) GetSpecific() types.DatabaseSpecificMigrator
- func (w *SQLiteMigratorWrapper) IsSystemTable(tableName string) bool
- type SQLiteRawQuery
- type SQLiteTransaction
- func (t *SQLiteTransaction) Commit(ctx context.Context) error
- func (t *SQLiteTransaction) CreateMany(ctx context.Context, modelName string, data []any) (types.Result, error)
- func (t *SQLiteTransaction) DeleteMany(ctx context.Context, modelName string, condition types.Condition) (types.Result, error)
- func (t *SQLiteTransaction) Model(modelName string) types.ModelQuery
- func (t *SQLiteTransaction) Raw(sql string, args ...any) types.RawQuery
- func (t *SQLiteTransaction) Rollback(ctx context.Context) error
- func (t *SQLiteTransaction) RollbackTo(ctx context.Context, name string) error
- func (t *SQLiteTransaction) Savepoint(ctx context.Context, name string) error
- func (t *SQLiteTransaction) UpdateMany(ctx context.Context, modelName string, condition types.Condition, data any) (types.Result, error)
- type SQLiteTransactionDB
- func (td *SQLiteTransactionDB) Begin(ctx context.Context) (types.Transaction, error)
- func (td *SQLiteTransactionDB) Close() error
- func (td *SQLiteTransactionDB) Connect(ctx context.Context) error
- func (td *SQLiteTransactionDB) CreateModel(ctx context.Context, modelName string) error
- func (td *SQLiteTransactionDB) DropModel(ctx context.Context, modelName string) error
- func (td *SQLiteTransactionDB) Exec(query string, args ...any) (sql.Result, error)
- func (td *SQLiteTransactionDB) GetCapabilities() types.DriverCapabilities
- func (td *SQLiteTransactionDB) GetDriverType() string
- func (td *SQLiteTransactionDB) GetLogger() logger.Logger
- func (td *SQLiteTransactionDB) GetMigrator() types.DatabaseMigrator
- func (td *SQLiteTransactionDB) GetModelSchema(modelName string) (*schema.Schema, error)
- func (td *SQLiteTransactionDB) GetModels() []string
- func (td *SQLiteTransactionDB) GetSchema(modelName string) (*schema.Schema, error)
- func (td *SQLiteTransactionDB) LoadSchema(ctx context.Context, schemaContent string) error
- func (td *SQLiteTransactionDB) LoadSchemaFrom(ctx context.Context, filename string) error
- func (td *SQLiteTransactionDB) Model(modelName string) types.ModelQuery
- func (td *SQLiteTransactionDB) Ping(ctx context.Context) error
- func (td *SQLiteTransactionDB) Query(query string, args ...any) (*sql.Rows, error)
- func (td *SQLiteTransactionDB) QueryRow(query string, args ...any) *sql.Row
- func (td *SQLiteTransactionDB) Raw(sql string, args ...any) types.RawQuery
- func (td *SQLiteTransactionDB) RegisterSchema(modelName string, schema *schema.Schema) error
- func (td *SQLiteTransactionDB) ResolveFieldName(modelName, fieldName string) (string, error)
- func (td *SQLiteTransactionDB) ResolveFieldNames(modelName string, fieldNames []string) ([]string, error)
- func (td *SQLiteTransactionDB) ResolveTableName(modelName string) (string, error)
- func (td *SQLiteTransactionDB) SetLogger(l logger.Logger)
- func (td *SQLiteTransactionDB) SyncSchemas(ctx context.Context) error
- func (td *SQLiteTransactionDB) Transaction(ctx context.Context, fn func(tx types.Transaction) error) error
- type SQLiteTransactionRawQuery
- type SQLiteURIParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSQLiteMigrator ¶
func NewSQLiteMigrator(db *sql.DB, sqliteDB *SQLiteDB) types.DatabaseMigrator
NewSQLiteMigrator creates a new SQLite migrator that implements types.DatabaseMigrator
Types ¶
type SQLiteCapabilities ¶
type SQLiteCapabilities struct{}
SQLiteCapabilities implements types.DriverCapabilities for SQLite
func NewSQLiteCapabilities ¶
func NewSQLiteCapabilities() *SQLiteCapabilities
NewSQLiteCapabilities creates new SQLite capabilities
func (*SQLiteCapabilities) GetBooleanLiteral ¶
func (c *SQLiteCapabilities) GetBooleanLiteral(value bool) string
func (*SQLiteCapabilities) GetDriverType ¶
func (c *SQLiteCapabilities) GetDriverType() types.DriverType
func (*SQLiteCapabilities) GetNullsOrderingSQL ¶
func (c *SQLiteCapabilities) GetNullsOrderingSQL(direction types.Order, nullsFirst bool) string
func (*SQLiteCapabilities) GetPlaceholder ¶
func (c *SQLiteCapabilities) GetPlaceholder(index int) string
func (*SQLiteCapabilities) GetSupportedSchemes ¶
func (c *SQLiteCapabilities) GetSupportedSchemes() []string
func (*SQLiteCapabilities) IsNoSQL ¶
func (c *SQLiteCapabilities) IsNoSQL() bool
func (*SQLiteCapabilities) IsSystemIndex ¶
func (c *SQLiteCapabilities) IsSystemIndex(indexName string) bool
func (*SQLiteCapabilities) IsSystemTable ¶
func (c *SQLiteCapabilities) IsSystemTable(tableName string) bool
func (*SQLiteCapabilities) NeedsTypeConversion ¶
func (c *SQLiteCapabilities) NeedsTypeConversion() bool
func (*SQLiteCapabilities) QuoteIdentifier ¶
func (c *SQLiteCapabilities) QuoteIdentifier(name string) string
func (*SQLiteCapabilities) RequiresLimitForOffset ¶
func (c *SQLiteCapabilities) RequiresLimitForOffset() bool
func (*SQLiteCapabilities) SupportsAggregationPipeline ¶
func (c *SQLiteCapabilities) SupportsAggregationPipeline() bool
func (*SQLiteCapabilities) SupportsArrayFields ¶
func (c *SQLiteCapabilities) SupportsArrayFields() bool
func (*SQLiteCapabilities) SupportsDefaultValues ¶
func (c *SQLiteCapabilities) SupportsDefaultValues() bool
func (*SQLiteCapabilities) SupportsDistinctOn ¶
func (c *SQLiteCapabilities) SupportsDistinctOn() bool
func (*SQLiteCapabilities) SupportsForeignKeys ¶ added in v0.6.0
func (c *SQLiteCapabilities) SupportsForeignKeys() bool
func (*SQLiteCapabilities) SupportsNestedDocuments ¶
func (c *SQLiteCapabilities) SupportsNestedDocuments() bool
func (*SQLiteCapabilities) SupportsReturning ¶
func (c *SQLiteCapabilities) SupportsReturning() bool
func (*SQLiteCapabilities) SupportsTransactions ¶
func (c *SQLiteCapabilities) SupportsTransactions() bool
type SQLiteDB ¶
SQLiteDB implements the Database interface for SQLite
func NewSQLiteDB ¶
NewSQLiteDB creates a new SQLite database instance The uri parameter should be a native SQLite path (e.g., "/path/to/db.sqlite" or ":memory:")
func (*SQLiteDB) CreateModel ¶
CreateModel creates a table for the given model
func (*SQLiteDB) GetCapabilities ¶
func (s *SQLiteDB) GetCapabilities() types.DriverCapabilities
GetCapabilities returns driver capabilities
func (*SQLiteDB) GetDriverType ¶
GetDriverType returns the database driver type
func (*SQLiteDB) GetMigrator ¶
func (s *SQLiteDB) GetMigrator() types.DatabaseMigrator
GetMigrator returns a migrator for SQLite
func (*SQLiteDB) Model ¶
func (s *SQLiteDB) Model(modelName string) types.ModelQuery
Model creates a new model query
func (*SQLiteDB) SyncSchemas ¶
SyncSchemas synchronizes all loaded schemas with the database
func (*SQLiteDB) Transaction ¶
Transaction executes a function within a transaction
type SQLiteMigrator ¶
type SQLiteMigrator struct {
// contains filtered or unexported fields
}
SQLiteMigrator implements types.DatabaseSpecificMigrator for SQLite
func (*SQLiteMigrator) ApplyMigration ¶
func (m *SQLiteMigrator) ApplyMigration(sql string) error
ApplyMigration executes a migration SQL
func (*SQLiteMigrator) ConvertFieldToColumnInfo ¶
func (m *SQLiteMigrator) ConvertFieldToColumnInfo(field schema.Field) *types.ColumnInfo
ConvertFieldToColumnInfo converts a schema field to column info
func (*SQLiteMigrator) FormatDefaultValue ¶
func (m *SQLiteMigrator) FormatDefaultValue(value any) string
FormatDefaultValue formats a default value for SQLite
func (*SQLiteMigrator) GenerateAddColumnSQL ¶
func (m *SQLiteMigrator) GenerateAddColumnSQL(tableName string, field any) (string, error)
GenerateAddColumnSQL generates ADD COLUMN SQL
func (*SQLiteMigrator) GenerateColumnDefinitionFromColumnInfo ¶
func (m *SQLiteMigrator) GenerateColumnDefinitionFromColumnInfo(col types.ColumnInfo) string
GenerateColumnDefinitionFromColumnInfo generates column definition from ColumnInfo
func (*SQLiteMigrator) GenerateCreateIndexSQL ¶
func (m *SQLiteMigrator) GenerateCreateIndexSQL(tableName, indexName string, columns []string, unique bool) string
GenerateCreateIndexSQL generates CREATE INDEX SQL
func (*SQLiteMigrator) GenerateCreateTableSQL ¶
func (m *SQLiteMigrator) GenerateCreateTableSQL(s *schema.Schema) (string, error)
GenerateCreateTableSQL generates CREATE TABLE SQL from schema (for DatabaseSpecificMigrator)
func (*SQLiteMigrator) GenerateDropColumnSQL ¶
func (m *SQLiteMigrator) GenerateDropColumnSQL(tableName, columnName string) ([]string, error)
GenerateDropColumnSQL generates DROP COLUMN SQL
func (*SQLiteMigrator) GenerateDropIndexSQL ¶
func (m *SQLiteMigrator) GenerateDropIndexSQL(indexName string) string
GenerateDropIndexSQL generates DROP INDEX SQL
func (*SQLiteMigrator) GenerateDropTableSQL ¶
func (m *SQLiteMigrator) GenerateDropTableSQL(tableName string) string
GenerateDropTableSQL generates DROP TABLE SQL
func (*SQLiteMigrator) GenerateModifyColumnSQL ¶
func (m *SQLiteMigrator) GenerateModifyColumnSQL(change types.ColumnChange) ([]string, error)
GenerateModifyColumnSQL generates SQL to modify a column (not directly supported in SQLite)
func (*SQLiteMigrator) GetDatabaseType ¶
func (m *SQLiteMigrator) GetDatabaseType() string
GetDatabaseType returns the database type
func (*SQLiteMigrator) GetTableInfo ¶
func (m *SQLiteMigrator) GetTableInfo(tableName string) (*types.TableInfo, error)
GetTableInfo returns table information
func (*SQLiteMigrator) GetTables ¶
func (m *SQLiteMigrator) GetTables() ([]string, error)
GetTables returns all table names
func (*SQLiteMigrator) IsPrimaryKeyIndex ¶ added in v0.6.0
func (m *SQLiteMigrator) IsPrimaryKeyIndex(indexName string) bool
IsPrimaryKeyIndex checks if an index name indicates it's a primary key index
func (*SQLiteMigrator) IsSystemIndex ¶
func (m *SQLiteMigrator) IsSystemIndex(indexName string) bool
IsSystemIndex checks if an index is a system-generated index in SQLite
func (*SQLiteMigrator) IsSystemTable ¶
func (m *SQLiteMigrator) IsSystemTable(tableName string) bool
IsSystemTable checks if a table is a system table in SQLite
func (*SQLiteMigrator) MapDatabaseTypeToFieldType ¶ added in v0.6.0
func (m *SQLiteMigrator) MapDatabaseTypeToFieldType(dbType string) schema.FieldType
MapDatabaseTypeToFieldType converts SQLite column types to schema field types
func (*SQLiteMigrator) MapFieldType ¶
func (m *SQLiteMigrator) MapFieldType(field schema.Field) string
MapFieldType maps schema field types to SQLite types
func (*SQLiteMigrator) NormalizeDefaultToPrismaFunction ¶ added in v0.6.0
func (m *SQLiteMigrator) NormalizeDefaultToPrismaFunction(value any, fieldType schema.FieldType) (string, bool)
NormalizeDefaultToPrismaFunction converts normalized defaults to Prisma function names
func (*SQLiteMigrator) ParseDefaultValue ¶ added in v0.6.0
func (m *SQLiteMigrator) ParseDefaultValue(value any, fieldType schema.FieldType) any
ParseDefaultValue parses SQLite-specific default values to normalized form
type SQLiteMigratorWrapper ¶
type SQLiteMigratorWrapper struct {
*base.BaseMigrator
// contains filtered or unexported fields
}
SQLiteMigratorWrapper wraps SQLiteMigrator with BaseMigrator to implement types.DatabaseMigrator
func (*SQLiteMigratorWrapper) CompareSchema ¶
func (w *SQLiteMigratorWrapper) CompareSchema(existingTable *types.TableInfo, desiredSchema any) (*types.MigrationPlan, error)
CompareSchema wraps the BaseMigrator's CompareSchema to match the DatabaseMigrator interface
func (*SQLiteMigratorWrapper) GenerateAddColumnSQL ¶
func (w *SQLiteMigratorWrapper) GenerateAddColumnSQL(tableName string, field any) (string, error)
GenerateAddColumnSQL wraps to match the DatabaseMigrator interface
func (*SQLiteMigratorWrapper) GenerateCreateTableSQL ¶
func (w *SQLiteMigratorWrapper) GenerateCreateTableSQL(schemaInterface any) (string, error)
GenerateCreateTableSQL wraps to match the DatabaseMigrator interface
func (*SQLiteMigratorWrapper) GetSpecific ¶ added in v0.6.0
func (w *SQLiteMigratorWrapper) GetSpecific() types.DatabaseSpecificMigrator
GetSpecific returns the specific migrator implementation
func (*SQLiteMigratorWrapper) IsSystemTable ¶
func (w *SQLiteMigratorWrapper) IsSystemTable(tableName string) bool
IsSystemTable delegates to the specific implementation
type SQLiteRawQuery ¶
type SQLiteRawQuery struct {
// contains filtered or unexported fields
}
SQLiteRawQuery implements the RawQuery interface for SQLite
type SQLiteTransaction ¶
type SQLiteTransaction struct {
// contains filtered or unexported fields
}
SQLiteTransaction implements the Transaction interface for SQLite
func NewSQLiteTransaction ¶
func NewSQLiteTransaction(tx *sql.Tx, database *SQLiteDB) *SQLiteTransaction
NewSQLiteTransaction creates a new SQLite transaction
func (*SQLiteTransaction) Commit ¶
func (t *SQLiteTransaction) Commit(ctx context.Context) error
Commit commits the transaction
func (*SQLiteTransaction) CreateMany ¶
func (t *SQLiteTransaction) CreateMany(ctx context.Context, modelName string, data []any) (types.Result, error)
CreateMany performs batch insert within the transaction
func (*SQLiteTransaction) DeleteMany ¶
func (t *SQLiteTransaction) DeleteMany(ctx context.Context, modelName string, condition types.Condition) (types.Result, error)
DeleteMany performs batch delete within the transaction
func (*SQLiteTransaction) Model ¶
func (t *SQLiteTransaction) Model(modelName string) types.ModelQuery
Model creates a new model query within the transaction
func (*SQLiteTransaction) Raw ¶
func (t *SQLiteTransaction) Raw(sql string, args ...any) types.RawQuery
Raw creates a new raw query within the transaction
func (*SQLiteTransaction) Rollback ¶
func (t *SQLiteTransaction) Rollback(ctx context.Context) error
Rollback rolls back the transaction
func (*SQLiteTransaction) RollbackTo ¶
func (t *SQLiteTransaction) RollbackTo(ctx context.Context, name string) error
RollbackTo rolls back to a savepoint
type SQLiteTransactionDB ¶
type SQLiteTransactionDB struct {
// contains filtered or unexported fields
}
SQLiteTransactionDB wraps the transaction for database operations
func (*SQLiteTransactionDB) Begin ¶
func (td *SQLiteTransactionDB) Begin(ctx context.Context) (types.Transaction, error)
func (*SQLiteTransactionDB) Close ¶
func (td *SQLiteTransactionDB) Close() error
func (*SQLiteTransactionDB) Connect ¶
func (td *SQLiteTransactionDB) Connect(ctx context.Context) error
All Database interface methods that delegate to the transaction
func (*SQLiteTransactionDB) CreateModel ¶
func (td *SQLiteTransactionDB) CreateModel(ctx context.Context, modelName string) error
func (*SQLiteTransactionDB) DropModel ¶
func (td *SQLiteTransactionDB) DropModel(ctx context.Context, modelName string) error
func (*SQLiteTransactionDB) GetCapabilities ¶
func (td *SQLiteTransactionDB) GetCapabilities() types.DriverCapabilities
func (*SQLiteTransactionDB) GetDriverType ¶
func (td *SQLiteTransactionDB) GetDriverType() string
func (*SQLiteTransactionDB) GetLogger ¶ added in v0.4.0
func (td *SQLiteTransactionDB) GetLogger() logger.Logger
func (*SQLiteTransactionDB) GetMigrator ¶
func (td *SQLiteTransactionDB) GetMigrator() types.DatabaseMigrator
func (*SQLiteTransactionDB) GetModelSchema ¶
func (td *SQLiteTransactionDB) GetModelSchema(modelName string) (*schema.Schema, error)
func (*SQLiteTransactionDB) GetModels ¶
func (td *SQLiteTransactionDB) GetModels() []string
func (*SQLiteTransactionDB) GetSchema ¶
func (td *SQLiteTransactionDB) GetSchema(modelName string) (*schema.Schema, error)
func (*SQLiteTransactionDB) LoadSchema ¶
func (td *SQLiteTransactionDB) LoadSchema(ctx context.Context, schemaContent string) error
LoadSchema is not supported within a transaction
func (*SQLiteTransactionDB) LoadSchemaFrom ¶
func (td *SQLiteTransactionDB) LoadSchemaFrom(ctx context.Context, filename string) error
LoadSchemaFrom is not supported within a transaction
func (*SQLiteTransactionDB) Model ¶
func (td *SQLiteTransactionDB) Model(modelName string) types.ModelQuery
func (*SQLiteTransactionDB) QueryRow ¶
func (td *SQLiteTransactionDB) QueryRow(query string, args ...any) *sql.Row
func (*SQLiteTransactionDB) Raw ¶
func (td *SQLiteTransactionDB) Raw(sql string, args ...any) types.RawQuery
func (*SQLiteTransactionDB) RegisterSchema ¶
func (td *SQLiteTransactionDB) RegisterSchema(modelName string, schema *schema.Schema) error
func (*SQLiteTransactionDB) ResolveFieldName ¶
func (td *SQLiteTransactionDB) ResolveFieldName(modelName, fieldName string) (string, error)
func (*SQLiteTransactionDB) ResolveFieldNames ¶
func (td *SQLiteTransactionDB) ResolveFieldNames(modelName string, fieldNames []string) ([]string, error)
func (*SQLiteTransactionDB) ResolveTableName ¶
func (td *SQLiteTransactionDB) ResolveTableName(modelName string) (string, error)
func (*SQLiteTransactionDB) SetLogger ¶ added in v0.4.0
func (td *SQLiteTransactionDB) SetLogger(l logger.Logger)
func (*SQLiteTransactionDB) SyncSchemas ¶
func (td *SQLiteTransactionDB) SyncSchemas(ctx context.Context) error
SyncSchemas is not supported within a transaction
func (*SQLiteTransactionDB) Transaction ¶
func (td *SQLiteTransactionDB) Transaction(ctx context.Context, fn func(tx types.Transaction) error) error
type SQLiteTransactionRawQuery ¶
type SQLiteTransactionRawQuery struct {
// contains filtered or unexported fields
}
SQLiteTransactionRawQuery implements RawQuery for transactions
type SQLiteURIParser ¶
type SQLiteURIParser struct{}
SQLiteURIParser implements URIParser for SQLite databases
func NewSQLiteURIParser ¶
func NewSQLiteURIParser() *SQLiteURIParser
NewSQLiteURIParser creates a new SQLite URI parser
func (*SQLiteURIParser) GetDriverType ¶
func (p *SQLiteURIParser) GetDriverType() string
GetDriverType returns the driver type this parser is for
func (*SQLiteURIParser) GetSupportedSchemes ¶
func (p *SQLiteURIParser) GetSupportedSchemes() []string
GetSupportedSchemes returns the URI schemes this parser supports
func (*SQLiteURIParser) ParseURI ¶
func (p *SQLiteURIParser) ParseURI(uri string) (string, error)
ParseURI parses a SQLite URI and returns a native SQLite file path Supported formats:
- sqlite:///path/to/database.db
- sqlite://:memory:
- sqlite://file::memory:?cache=shared
- sqlite:///absolute/path/database.db
- sqlite://relative/path/database.db