sqlite

package module
v1.20.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 35 Imported by: 0

README

SQLite

SQLite runtime driver for github.com/gradii/framework, forked from goravel/sqlite. Connections use the native github.com/ncruces/go-sqlite3 connector and embedded SQLite engine without GORM or CGO.

Register &sqlite.ServiceProvider{} and select the connection through via:

import (
    "github.com/gradii/framework/contracts/database/driver"
    sqlitefacades "github.com/gradii/sqlite/facades"
)

"sqlite": map[string]any{
    "driver": "sqlite",
    "database": "database/app.sqlite",
    "prefix": "",
    "via": func() (driver.Driver, error) {
        return sqlitefacades.Sqlite("sqlite")
    },
},

An explicit Connector takes priority over dsn, which takes priority over database. DSNs accept the native driver's file URI and pragma options. Reader and writer entries use []contracts.Config; empty fields inherit the named connection's values. The framework owns pools, transactions, and connection lifetimes. Pool() only normalizes configuration and performs no network I/O.

The driver provides query compilation, schema types and modifiers, metadata, database file operations, and transactional table rebuilding. Rebuilds retain indexes, triggers, generated columns and constraints, including attached schemas. Foreign keys must be disabled before starting a transaction that rebuilds a table; the framework automatically leases and restores the session for normal schema operations. SQLite database-file operations accept paths or :memory:.

Use explicit table and column mappings; prefix remains supported while singular, name_replacer and no_lower_case are removed. Docker helpers and installation tooling are outside this runtime module. Driver.Docker() returns an unsupported error.

Development

This driver requires the matching framework changes. The dependency must be updated to a published revision containing the new contracts before release. For sibling checkouts, create an ignored local workspace:

go work init . ../goravel-framework
go work edit -replace=github.com/gradii/framework@v1.20.0-alpha.0=../goravel-framework
go test -race ./...

The runtime suite includes native in-memory and file database integration tests. Upstream test cases have been ported to the new query/schema/connector APIs. Database-fixture lifecycle coverage lives in the framework's integration module. The old implementation and its GORM dependencies are not retained.

Documentation

Index

Constants

View Source
const (
	Binding = "goravel.sqlite"
	Name    = "SQLite"
)

Variables

View Source
var ConfigNotFound = sqliteerrors.ConfigNotFound
View Source
var FailedToGenerateDSN = sqliteerrors.FailedToGenerateDSN

Functions

func NewConnector

func NewConnector(config database.Config) (driver.Connector, error)

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(config config.Config, connection string) *Config

func (*Config) Config

func (r *Config) Config() config.Config

func (*Config) Connection

func (r *Config) Connection() string

func (*Config) Readers

func (r *Config) Readers() []contracts.FullConfig

func (*Config) Writers

func (r *Config) Writers() []contracts.FullConfig

type Dialect

type Dialect struct{}

func NewDialect

func NewDialect() *Dialect

func (*Dialect) Escape

func (d *Dialect) Escape(value any, binary bool) (string, error)

Escape formats a SQLite scalar literal for SQL previews. Query execution uses bound parameters, independently of this presentation-only operation.

func (*Dialect) Name

func (*Dialect) Name() string

func (*Dialect) NewConnector

func (*Dialect) NewConnector(config database.Config) (driver.Connector, error)

func (*Dialect) NewProcessor

func (*Dialect) NewProcessor() contractsquery.Processor

func (*Dialect) NewQueryGrammar

func (*Dialect) NewQueryGrammar(options contractsdriver.GrammarOptions) contractsquery.Grammar

func (*Dialect) ServerVersionSQL

func (*Dialect) ServerVersionSQL() string

type Grammar

type Grammar = SchemaGrammar

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

Processor adapts the legacy typed metadata contract to the canonical query processor.

func NewProcessor

func NewProcessor() *Processor

func (Processor) ProcessColumns

func (r Processor) ProcessColumns(values []driver.DBColumn) []driver.Column

func (Processor) ProcessForeignKeys

func (r Processor) ProcessForeignKeys(values []driver.DBForeignKey) []driver.ForeignKey

func (Processor) ProcessIndexes

func (r Processor) ProcessIndexes(values []driver.DBIndex) []driver.Index

func (Processor) ProcessTypes

func (r Processor) ProcessTypes(values []driver.Type) []driver.Type

type QueryGrammar

type QueryGrammar struct {
	*grammars.BaseGrammar
}

QueryGrammar mirrors Illuminate\Database\Query\Grammars\SQLiteGrammar. Only the methods whose SQL differs from the base are declared here. SQLite quotes with double quotes, like the base.

func NewQueryGrammar

func NewQueryGrammar(prefix string) *QueryGrammar

NewQueryGrammar creates the SQLite grammar.

func (*QueryGrammar) CompileDelete

func (g *QueryGrammar) CompileDelete(b core.Query) string

CompileDelete mirrors SQLiteGrammar::compileDelete(): joins or a limit take the rowid rewrite.

func (*QueryGrammar) CompileGroupLimit

func (g *QueryGrammar) CompileGroupLimit(b core.Query) string

CompileGroupLimit mirrors SQLiteGrammar::compileGroupLimit(): modern SQLite uses the base rewrite.

func (*QueryGrammar) CompileIndexHint

func (g *QueryGrammar) CompileIndexHint(b core.Query, hint *core.IndexHint) string

CompileIndexHint mirrors SQLiteGrammar::compileIndexHint().

func (*QueryGrammar) CompileInsertOrIgnore

func (g *QueryGrammar) CompileInsertOrIgnore(b core.Query, values []map[string]any) string

CompileInsertOrIgnore mirrors SQLiteGrammar::compileInsertOrIgnore().

func (*QueryGrammar) CompileInsertOrIgnoreUsing

func (g *QueryGrammar) CompileInsertOrIgnoreUsing(b core.Query, columns []any, sql string) string

CompileInsertOrIgnoreUsing mirrors SQLiteGrammar::compileInsertOrIgnoreUsing().

func (*QueryGrammar) CompileJsonContains

func (g *QueryGrammar) CompileJsonContains(column string, value string) string

CompileJsonContains mirrors SQLiteGrammar::compileJsonContains().

func (*QueryGrammar) CompileJsonContainsKey

func (g *QueryGrammar) CompileJsonContainsKey(column string) string

CompileJsonContainsKey mirrors SQLiteGrammar::compileJsonContainsKey().

func (*QueryGrammar) CompileJsonLength

func (g *QueryGrammar) CompileJsonLength(column string, operator string, value string) string

CompileJsonLength mirrors SQLiteGrammar::compileJsonLength().

func (*QueryGrammar) CompileJsonPatch

func (g *QueryGrammar) CompileJsonPatch(column string, value any) string

CompileJsonPatch mirrors SQLiteGrammar::compileJsonPatch().

func (*QueryGrammar) CompileLock

func (g *QueryGrammar) CompileLock(b core.Query, value any) string

CompileLock mirrors SQLiteGrammar::compileLock().

func (*QueryGrammar) CompileTruncate

func (g *QueryGrammar) CompileTruncate(b core.Query) []core.Statement

CompileTruncate mirrors SQLiteGrammar::compileTruncate(): the sequence table is reset too.

Laravel asks the connection's schema builder for parseSchemaAndTable. That method only splits the reference on ".", so the same split is done here: a schema-qualified table keeps its schema on the sqlite_sequence delete, and only the bare table name is prefixed in the binding.

func (*QueryGrammar) CompileUpdate

func (g *QueryGrammar) CompileUpdate(b core.Query, values core.UpdateValues) string

CompileUpdate mirrors SQLiteGrammar::compileUpdate(): joins or a limit take the rowid rewrite.

func (*QueryGrammar) CompileUpdateColumns

func (g *QueryGrammar) CompileUpdateColumns(b core.Query, values core.UpdateValues) string

CompileUpdateColumns mirrors SQLiteGrammar::compileUpdateColumns(): the JSON selectors of one column are folded into a single json_patch() assignment appended last, and the patch names the wrapped column rather than the extraction inside it. Every other assignment keeps its order and its value.

func (*QueryGrammar) CompileUpsert

func (g *QueryGrammar) CompileUpsert(b core.Query, values []map[string]any, uniqueBy []string, update []core.UpsertUpdate) string

CompileUpsert mirrors SQLiteGrammar::compileUpsert(): on conflict do update with excluded.

func (*QueryGrammar) PrepareBindingForJsonContains

func (g *QueryGrammar) PrepareBindingForJsonContains(value any) any

PrepareBindingForJsonContains mirrors SQLiteGrammar::prepareBindingForJsonContains().

func (*QueryGrammar) PrepareBindingsForUpdate

func (g *QueryGrammar) PrepareBindingsForUpdate(bindings map[string][]any, values core.UpdateValues) []any

PrepareBindingsForUpdate mirrors SQLiteGrammar::prepareBindingsForUpdate(): the JSON selectors are regrouped into one nested document per column, every array value is json-encoded, and the set values precede the bindings of every clause except select.

func (*QueryGrammar) PrepareJsonContains

func (g *QueryGrammar) PrepareJsonContains(value any) (any, any, error)

PrepareJsonContains keeps SQLite's scalar membership and the existing flat-list extension. JSON document Valuers are decoded before checking their shape; objects and nested collections cannot be compared structurally by json_each.value IS ? and must not reach binding flattening.

func (*QueryGrammar) PrepareWhereLikeBinding

func (g *QueryGrammar) PrepareWhereLikeBinding(value string, caseSensitive bool) string

PrepareWhereLikeBinding mirrors SQLiteGrammar::prepareWhereLikeBinding().

func (*QueryGrammar) WhereBasic

func (g *QueryGrammar) WhereBasic(b core.Query, where core.Where) string

WhereBasic mirrors SQLiteGrammar::whereBasic(): the null-safe equality operator becomes IS.

func (*QueryGrammar) WhereDate

func (g *QueryGrammar) WhereDate(b core.Query, where core.Where) string

WhereDate mirrors SQLiteGrammar::whereDate().

func (*QueryGrammar) WhereDay

func (g *QueryGrammar) WhereDay(b core.Query, where core.Where) string

WhereDay mirrors SQLiteGrammar::whereDay().

func (*QueryGrammar) WhereJsonContains

func (g *QueryGrammar) WhereJsonContains(b core.Query, where core.Where) string

WhereJsonContains mirrors SQLiteGrammar::whereJsonContains().

Laravel's SQLite grammar compiles a single "json_each" predicate with one "is ?" parameter, which cannot bind a list: the binding path flattens a list value into one binding per element, so the statement would carry several arguments against the one placeholder and fail with "expected 1 arguments, got 2". A list is therefore expanded into one predicate per element, ANDed together, each taking its own binding - the shape the pre-port Sqlite grammar produced. A scalar value, and a raw expression, compile exactly as the base grammar does.

The negated (WhereJsonDoesntContain) form negates that whole conjunction rather than each predicate, so a row "does not contain" the list when it is missing at least one element. That is the meaning MySQL's "not json_contains(column, list)" and Postgres' "not column @> list" carry, and it makes the clause the exact negation of its positive form. Negating each predicate instead would read "contains none" and quietly diverge from the other two dialects for the same call.

func (*QueryGrammar) WhereLike

func (g *QueryGrammar) WhereLike(b core.Query, where core.Where) string

WhereLike mirrors SQLiteGrammar::whereLike(): a case sensitive match uses glob.

func (*QueryGrammar) WhereMonth

func (g *QueryGrammar) WhereMonth(b core.Query, where core.Where) string

WhereMonth mirrors SQLiteGrammar::whereMonth().

func (*QueryGrammar) WhereTime

func (g *QueryGrammar) WhereTime(b core.Query, where core.Where) string

WhereTime mirrors SQLiteGrammar::whereTime().

func (*QueryGrammar) WhereYear

func (g *QueryGrammar) WhereYear(b core.Query, where core.Where) string

WhereYear mirrors SQLiteGrammar::whereYear().

func (*QueryGrammar) WrapJsonSelector

func (g *QueryGrammar) WrapJsonSelector(value string) string

WrapJsonSelector mirrors SQLiteGrammar::wrapJsonSelector().

func (*QueryGrammar) WrapUnion

func (g *QueryGrammar) WrapUnion(sql string) string

WrapUnion mirrors SQLiteGrammar::wrapUnion().

type QueryProcessor

type QueryProcessor struct{ processors.BaseProcessor }

QueryProcessor inherits the base insert-ID processing, as in Laravel.

func NewQueryProcessor

func NewQueryProcessor() *QueryProcessor

func (*QueryProcessor) ProcessColumns

func (p *QueryProcessor) ProcessColumns(results []contractsquery.Row, sql ...string) []contractsquery.Row

ProcessColumns ports SQLiteProcessor::processColumns. The optional CREATE TABLE statement supplies collations and generated expressions that SQLite's column pragma does not expose.

func (*QueryProcessor) ProcessForeignKeys

func (p *QueryProcessor) ProcessForeignKeys(rows []contractsquery.Row) []contractsquery.Row

func (*QueryProcessor) ProcessIndexes

func (p *QueryProcessor) ProcessIndexes(rows []contractsquery.Row) []contractsquery.Row

type SchemaGrammar

type SchemaGrammar struct {
	// contains filtered or unexported fields
}

func NewGrammar

func NewGrammar(log log.Log, prefix string) *SchemaGrammar

func NewSchemaGrammar

func NewSchemaGrammar(log log.Log, prefix string) *SchemaGrammar

func (*SchemaGrammar) CompileAdd

func (r *SchemaGrammar) CompileAdd(blueprint driver.Blueprint, command *driver.Command) string

func (*SchemaGrammar) CompileChange

func (r *SchemaGrammar) CompileChange(blueprint driver.Blueprint, command *driver.Command) []string

func (*SchemaGrammar) CompileColumns

func (r *SchemaGrammar) CompileColumns(_, table string) (string, error)

func (*SchemaGrammar) CompileComment

func (r *SchemaGrammar) CompileComment(blueprint driver.Blueprint, command *driver.Command) string

func (*SchemaGrammar) CompileCreate

func (r *SchemaGrammar) CompileCreate(blueprint driver.Blueprint) string

func (*SchemaGrammar) CompileDefault

func (r *SchemaGrammar) CompileDefault(_ driver.Blueprint, _ *driver.Command) string

func (*SchemaGrammar) CompileDisableWriteableSchema

func (r *SchemaGrammar) CompileDisableWriteableSchema() string

func (*SchemaGrammar) CompileDrop

func (r *SchemaGrammar) CompileDrop(blueprint driver.Blueprint) string

func (*SchemaGrammar) CompileDropAllDomains

func (r *SchemaGrammar) CompileDropAllDomains(domains []string) string

func (*SchemaGrammar) CompileDropAllTables

func (r *SchemaGrammar) CompileDropAllTables(_ string, _ []driver.Table) []string

func (*SchemaGrammar) CompileDropAllTypes

func (r *SchemaGrammar) CompileDropAllTypes(_ string, _ []driver.Type) []string

func (*SchemaGrammar) CompileDropAllViews

func (r *SchemaGrammar) CompileDropAllViews(_ string, _ []driver.View) []string

func (*SchemaGrammar) CompileDropColumn

func (r *SchemaGrammar) CompileDropColumn(blueprint driver.Blueprint, command *driver.Command) []string

func (*SchemaGrammar) CompileDropForeign

func (r *SchemaGrammar) CompileDropForeign(_ driver.Blueprint, _ *driver.Command) string

func (*SchemaGrammar) CompileDropFullText

func (r *SchemaGrammar) CompileDropFullText(_ driver.Blueprint, _ *driver.Command) string

func (*SchemaGrammar) CompileDropIfExists

func (r *SchemaGrammar) CompileDropIfExists(blueprint driver.Blueprint) string

func (*SchemaGrammar) CompileDropIndex

func (r *SchemaGrammar) CompileDropIndex(blueprint driver.Blueprint, command *driver.Command) string

func (*SchemaGrammar) CompileDropPrimary

func (r *SchemaGrammar) CompileDropPrimary(_ driver.Blueprint, _ *driver.Command) string

func (*SchemaGrammar) CompileDropUnique

func (r *SchemaGrammar) CompileDropUnique(blueprint driver.Blueprint, command *driver.Command) string

func (*SchemaGrammar) CompileEnableWriteableSchema

func (r *SchemaGrammar) CompileEnableWriteableSchema() string

func (*SchemaGrammar) CompileForeign

func (r *SchemaGrammar) CompileForeign(_ driver.Blueprint, _ *driver.Command) string

func (*SchemaGrammar) CompileForeignKeys

func (r *SchemaGrammar) CompileForeignKeys(_, table string) string

func (*SchemaGrammar) CompileFullText

func (r *SchemaGrammar) CompileFullText(_ driver.Blueprint, _ *driver.Command) string

func (*SchemaGrammar) CompileInRandomOrder

func (r *SchemaGrammar) CompileInRandomOrder(builder sq.SelectBuilder, conditions *driver.Conditions) sq.SelectBuilder

func (*SchemaGrammar) CompileIndex

func (r *SchemaGrammar) CompileIndex(blueprint driver.Blueprint, command *driver.Command) string

func (*SchemaGrammar) CompileIndexes

func (r *SchemaGrammar) CompileIndexes(_, table string) (string, error)

func (*SchemaGrammar) CompileJsonColumnsUpdate

func (r *SchemaGrammar) CompileJsonColumnsUpdate(values map[string]any) (map[string]any, error)

func (*SchemaGrammar) CompileJsonContains

func (r *SchemaGrammar) CompileJsonContains(column string, value any, isNot bool) (string, []any, error)

func (*SchemaGrammar) CompileJsonContainsKey

func (r *SchemaGrammar) CompileJsonContainsKey(column string, isNot bool) string

func (*SchemaGrammar) CompileJsonLength

func (r *SchemaGrammar) CompileJsonLength(column string) string

func (*SchemaGrammar) CompileJsonSelector

func (r *SchemaGrammar) CompileJsonSelector(column string) string

func (*SchemaGrammar) CompileJsonValues

func (r *SchemaGrammar) CompileJsonValues(args ...any) []any

func (*SchemaGrammar) CompileLockForUpdate

func (r *SchemaGrammar) CompileLockForUpdate(builder sq.SelectBuilder, conditions *driver.Conditions) sq.SelectBuilder

func (*SchemaGrammar) CompilePlaceholderFormat

func (r *SchemaGrammar) CompilePlaceholderFormat() driver.PlaceholderFormat

func (*SchemaGrammar) CompilePrimary

func (r *SchemaGrammar) CompilePrimary(_ driver.Blueprint, _ *driver.Command) string

func (*SchemaGrammar) CompilePrune

func (r *SchemaGrammar) CompilePrune(_ string) string

func (*SchemaGrammar) CompileRename

func (r *SchemaGrammar) CompileRename(blueprint driver.Blueprint, command *driver.Command) string

func (*SchemaGrammar) CompileRenameColumn

func (r *SchemaGrammar) CompileRenameColumn(blueprint driver.Blueprint, command *driver.Command, _ []driver.Column) (string, error)

func (*SchemaGrammar) CompileRenameIndex

func (r *SchemaGrammar) CompileRenameIndex(blueprint driver.Blueprint, command *driver.Command, indexes []driver.Index) []string

func (*SchemaGrammar) CompileSchemaBlueprint

func (r *SchemaGrammar) CompileSchemaBlueprint(blueprint driver.Blueprint, catalog driver.SchemaCatalog) ([]driver.SchemaStatement, bool, error)

func (*SchemaGrammar) CompileSchemaCommand

func (r *SchemaGrammar) CompileSchemaCommand(blueprint driver.Blueprint, command *driver.Command) ([]driver.SchemaStatement, bool, error)

func (*SchemaGrammar) CompileSchemaMetadata

func (r *SchemaGrammar) CompileSchemaMetadata(query driver.SchemaMetadataQuery) (driver.SchemaStatement, error)

func (*SchemaGrammar) CompileSchemaOperation

func (r *SchemaGrammar) CompileSchemaOperation(operation driver.SchemaOperation) ([]driver.SchemaStatement, error)

func (*SchemaGrammar) CompileSchemaStartingValues

func (r *SchemaGrammar) CompileSchemaStartingValues(driver.Blueprint) ([]driver.SchemaStatement, error)

func (*SchemaGrammar) CompileSharedLock

func (r *SchemaGrammar) CompileSharedLock(builder sq.SelectBuilder, conditions *driver.Conditions) sq.SelectBuilder

func (*SchemaGrammar) CompileTableComment

func (r *SchemaGrammar) CompileTableComment(_ driver.Blueprint, _ *driver.Command) string

func (*SchemaGrammar) CompileTables

func (r *SchemaGrammar) CompileTables(database string) string

func (*SchemaGrammar) CompileTypes

func (r *SchemaGrammar) CompileTypes() string

func (*SchemaGrammar) CompileUnique

func (r *SchemaGrammar) CompileUnique(blueprint driver.Blueprint, command *driver.Command) string

func (*SchemaGrammar) CompileVersion

func (r *SchemaGrammar) CompileVersion() string

func (*SchemaGrammar) CompileViews

func (r *SchemaGrammar) CompileViews(database string) string

func (*SchemaGrammar) CreateDatabase

func (r *SchemaGrammar) CreateDatabase(name string) error

func (*SchemaGrammar) CurrentSchemas

func (r *SchemaGrammar) CurrentSchemas(string) []string

func (*SchemaGrammar) DropDatabaseIfExists

func (r *SchemaGrammar) DropDatabaseIfExists(name string) error

func (*SchemaGrammar) ForeignKeyStateQuery

func (r *SchemaGrammar) ForeignKeyStateQuery() string

func (*SchemaGrammar) GetAttributeCommands

func (r *SchemaGrammar) GetAttributeCommands() []string

func (*SchemaGrammar) GetModifiers

func (r *SchemaGrammar) GetModifiers() []func(blueprint driver.Blueprint, column driver.ColumnDefinition) string

func (*SchemaGrammar) ModifyDefault

func (r *SchemaGrammar) ModifyDefault(blueprint driver.Blueprint, column driver.ColumnDefinition) string

func (*SchemaGrammar) ModifyIncrement

func (r *SchemaGrammar) ModifyIncrement(blueprint driver.Blueprint, column driver.ColumnDefinition) string

func (*SchemaGrammar) ModifyNullable

func (r *SchemaGrammar) ModifyNullable(blueprint driver.Blueprint, column driver.ColumnDefinition) string

func (*SchemaGrammar) ResolveCurrentSchemas

func (r *SchemaGrammar) ResolveCurrentSchemas(driver.SchemaConnectionInfo, driver.SchemaCatalog) ([]string, error)

func (*SchemaGrammar) ResolveSchemaMetadata

func (r *SchemaGrammar) ResolveSchemaMetadata(query driver.SchemaMetadataQuery, catalog driver.SchemaCatalog) (driver.SchemaMetadataResult, error)

func (*SchemaGrammar) SchemaExecutionPolicy

func (r *SchemaGrammar) SchemaExecutionPolicy(blueprint driver.Blueprint) driver.SchemaExecutionPolicy

func (*SchemaGrammar) SchemaOperationPolicy

func (r *SchemaGrammar) SchemaOperationPolicy(operation driver.SchemaOperation) driver.SchemaExecutionPolicy

func (*SchemaGrammar) TypeBigInteger

func (r *SchemaGrammar) TypeBigInteger(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeBoolean

func (r *SchemaGrammar) TypeBoolean(_ driver.ColumnDefinition) string

func (*SchemaGrammar) TypeChar

func (r *SchemaGrammar) TypeChar(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeDate

func (r *SchemaGrammar) TypeDate(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeDateTime

func (r *SchemaGrammar) TypeDateTime(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeDateTimeTz

func (r *SchemaGrammar) TypeDateTimeTz(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeDecimal

func (r *SchemaGrammar) TypeDecimal(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeDouble

func (r *SchemaGrammar) TypeDouble(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeEnum

func (r *SchemaGrammar) TypeEnum(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeFloat

func (r *SchemaGrammar) TypeFloat(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeInteger

func (r *SchemaGrammar) TypeInteger(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeJson

func (r *SchemaGrammar) TypeJson(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeJsonb

func (r *SchemaGrammar) TypeJsonb(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeLongText

func (r *SchemaGrammar) TypeLongText(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeMediumInteger

func (r *SchemaGrammar) TypeMediumInteger(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeMediumText

func (r *SchemaGrammar) TypeMediumText(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeSmallInteger

func (r *SchemaGrammar) TypeSmallInteger(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeString

func (r *SchemaGrammar) TypeString(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeText

func (r *SchemaGrammar) TypeText(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeTime

func (r *SchemaGrammar) TypeTime(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeTimeTz

func (r *SchemaGrammar) TypeTimeTz(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeTimestamp

func (r *SchemaGrammar) TypeTimestamp(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeTimestampTz

func (r *SchemaGrammar) TypeTimestampTz(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeTinyInteger

func (r *SchemaGrammar) TypeTinyInteger(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeTinyText

func (r *SchemaGrammar) TypeTinyText(column driver.ColumnDefinition) string

func (*SchemaGrammar) TypeUuid

func (r *SchemaGrammar) TypeUuid(column driver.ColumnDefinition) string

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (r *ServiceProvider) Boot(app foundation.Application)

func (*ServiceProvider) Register

func (r *ServiceProvider) Register(app foundation.Application)

func (*ServiceProvider) Relationship

func (r *ServiceProvider) Relationship() binding.Relationship

type Sqlite

type Sqlite struct {
	// contains filtered or unexported fields
}

func NewSqlite

func NewSqlite(config config.Config, log log.Log, connection string) *Sqlite

func (*Sqlite) Dialect

func (r *Sqlite) Dialect() driver.Dialect

func (*Sqlite) Docker

func (r *Sqlite) Docker() (docker.DatabaseDriver, error)

func (*Sqlite) Grammar

func (r *Sqlite) Grammar() driver.Grammar

func (*Sqlite) Pool

func (r *Sqlite) Pool() database.Pool

func (*Sqlite) Processor

func (r *Sqlite) Processor() driver.Processor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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