{"modulePath":"github.com/xmapst/taskflow","version":"v0.0.0-20261127030116-2fa33bcfeb3e","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package xsqlite\n\n## Constants\n\n```go\nconst DriverName = \"sqlite\"\n```\nDriverName is the default driver name for SQLite.\n\n## Functions\n\n```go\nfunc DefaultDSN(dsn string) string\n```\nDefaultDSN preserves GORM's time.Time scan behavior with modernc and enables foreign keys on each new physical connection. Explicit DSN options take precedence. This can also be used when opening an external modernc pool.\n\n```go\nfunc New(config Config) gorm.Dialector\n```\n\n```go\nfunc Open(dsn string) gorm.Dialector\n```\n\n## Types\n\n```go\ntype Config struct {\n\tDriverName string\n\tDSN        string\n\tConn       gorm.ConnPool\n\n\t// ForeignKeysPerConnection is the caller's guarantee for an externally\n\t// configured pool or custom driver; xsqlite does not modify those pools.\n\tForeignKeysPerConnection bool\n}\n```\n\n```go\ntype Dialector struct {\n\tDriverName string\n\tDSN        string\n\tConn       gorm.ConnPool\n\n\t// ForeignKeysPerConnection declares that a supplied Conn or custom driver\n\t// enables foreign keys on every physical connection before use. The\n\t// built-in driver applies this by default, subject to explicit DSN options.\n\tForeignKeysPerConnection bool\n}\n```\n\n```go\nfunc (d Dialector) BindVarTo(writer clause.Writer, stmt *gorm.Statement, v any)\n```\n\n```go\nfunc (d Dialector) ClauseBuilders() map[string]clause.ClauseBuilder\n```\n\n```go\nfunc (d Dialector) ConfiguresForeignKeys() bool\n```\nConfiguresForeignKeys reports whether opening this dialector's pool applies the modernc defaults or the caller has explicitly opted into the external pool contract. The consumer must still check that foreign keys are enabled: modernc callers are allowed to override the default in the DSN.\n\n```go\nfunc (d Dialector) DataTypeOf(field *schema.Field) string\n```\n\n```go\nfunc (d Dialector) DefaultValueOf(field *schema.Field) clause.Expression\n```\n\n```go\nfunc (d Dialector) Explain(sql string, vars ...any) string\n```\n\n```go\nfunc (d Dialector) Initialize(db *gorm.DB) (err error)\n```\n\n```go\nfunc (d Dialector) Migrator(db *gorm.DB) gorm.Migrator\n```\n\n```go\nfunc (d Dialector) Name() string\n```\n\n```go\nfunc (d Dialector) QuoteTo(writer clause.Writer, str string)\n```\n\n```go\nfunc (d Dialector) RollbackTo(tx *gorm.DB, name string) error\n```\n\n```go\nfunc (d Dialector) SavePoint(tx *gorm.DB, name string) error\n```\n\n```go\nfunc (d Dialector) Translate(err error) error\n```\n\n```go\ntype Index struct {\n\tName    string\n\tOrigin  string\n\tSeq     int\n\tUnique  bool\n\tPartial bool\n}\n```\n\n```go\ntype JSON jsontext.Value\n```\nJSON uses a JSON declaration and standard JSON values, never binary JSONB. Objects/arrays are stored as text. SQLite's NUMERIC affinity can coerce numeric scalars; use gorm:\"type:JSON TEXT\" when exact numeric text must be preserved. A zero value represents SQL NULL; JSON(\"null\") represents JSON null. Use json\\_valid in a CHECK constraint if writes outside this type must also be validated: SQLite's JSON declaration alone does not enforce validity.\n\n```go\nfunc (JSON) GormDBDataType(_ *gorm.DB, field *schema.Field) string\n```\n\n```go\nfunc (JSON) GormDataType() string\n```\n\n```go\nfunc (j JSON) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (j *JSON) Scan(value any) error\n```\n\n```go\nfunc (j *JSON) UnmarshalJSON(data []byte) error\n```\n\n```go\nfunc (j JSON) Value() (driver.Value, error)\n```\n\n```go\ntype Migrator struct {\n\tmigrator.Migrator\n}\n```\n\n```go\nfunc (m *Migrator) AlterColumn(value any, name string) error\n```\n\n```go\nfunc (m *Migrator) BuildIndexOptions(opts []schema.IndexOption, stmt *gorm.Statement) (results []any)\n```\n\n```go\nfunc (m *Migrator) ColumnTypes(value any) ([]gorm.ColumnType, error)\n```\nColumnTypes returns metadata for the table’s columns.\n\n```go\nfunc (m *Migrator) CreateConstraint(value any, name string) error\n```\n\n```go\nfunc (m *Migrator) CreateIndex(value any, name string) error\n```\n\n```go\nfunc (m *Migrator) CurrentDatabase() (name string)\n```\n\n```go\nfunc (m *Migrator) DropColumn(value any, name string) error\n```\n\n```go\nfunc (m *Migrator) DropConstraint(value any, name string) error\n```\n\n```go\nfunc (m *Migrator) DropIndex(value any, name string) error\n```\n\n```go\nfunc (m *Migrator) DropTable(values ...any) error\n```\n\n```go\nfunc (m *Migrator) GetIndexes(value any) ([]gorm.Index, error)\n```\nGetIndexes return Indexes \\[]gorm.Index and execErr error, See the [doc](https://www.sqlite.org/pragma.html#pragma_index_list)\n\n```go\nfunc (m *Migrator) GetTables() (tableList []string, err error)\n```\n\n```go\nfunc (m *Migrator) HasColumn(value any, name string) bool\n```\n\n```go\nfunc (m *Migrator) HasConstraint(value any, name string) bool\n```\n\n```go\nfunc (m *Migrator) HasIndex(value any, name string) bool\n```\n\n```go\nfunc (m *Migrator) HasTable(value any) bool\n```\n\n```go\nfunc (m *Migrator) RenameIndex(value any, oldName, newName string) error\n```\n\n```go\nfunc (m *Migrator) RunWithoutForeignKey(fc func() error) error\n```\n\n","path":"github.com/xmapst/taskflow/pkg/xsqlite","name":"xsqlite","synopsis":"","isRedistributable":true}
