Categorygithub.com/goravel/sqlite
modulepackage
0.0.0-20250218091018-e1f7842bf316
Repository: https://github.com/goravel/sqlite.git
Documentation: pkg.go.dev

# README

Sqlite

The Sqlite driver for facades.Orm() of Goravel.

Version

goravel/sqlitegoravel/framework
v1.0.*v1.16.*

Install

  1. Add package
go get -u github.com/goravel/sqlite
  1. Register service provider
// config/app.go
import "github.com/goravel/sqlite"

"providers": []foundation.ServiceProvider{
    ...
    &sqlite.ServiceProvider{},
}
  1. Add Sqlite driver to config/database.go file
// config/database.go
import (
    "github.com/goravel/framework/contracts/database/driver"
    "github.com/goravel/sqlite/contracts"
    sqlitefacades "github.com/goravel/sqlite/facades"
)

"connections": map[string]any{
    ...
    "sqlite": map[string]any{
        "database": config.Env("DB_DATABASE", "forge"),
        "prefix":   "",
        "singular": false,
        "via": func() (driver.Driver, error) {
            return sqlitefacades.Sqlite("sqlite")
        },
        // Optional
        "read": []contracts.Config{
            {Database: "forge"},
        },
        // Optional
        "write": []contracts.Config{
            {Database: "forge"},
        },
    },
}

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author