Skip to content
/ sqlite Public

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

License

Notifications You must be signed in to change notification settings

goravel/sqlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e1f7842 · Feb 18, 2025

History

9 Commits
Feb 3, 2025
Feb 3, 2025
Feb 18, 2025
Feb 3, 2025
Feb 3, 2025
Feb 3, 2025
Jan 6, 2025
Feb 18, 2025
Feb 3, 2025
Feb 3, 2025
Feb 7, 2025
Feb 3, 2025
Feb 3, 2025
Feb 12, 2025
Feb 12, 2025
Feb 3, 2025
Feb 3, 2025
Feb 10, 2025
Feb 9, 2025
Feb 3, 2025
Feb 3, 2025
Feb 3, 2025
Feb 7, 2025
Feb 12, 2025
Feb 3, 2025

Repository files navigation

Sqlite

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

Version

goravel/sqlite goravel/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"},
        },
    },
}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages