sqlite

package module
v0.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 3 Imported by: 0

README

database/sqlite

SQLite driver adapter for github.com/kbukum/gokit/database.

The core database module owns the database component, repository helpers, and DriverRegistry. This adapter owns the SQLite driver dependency and registers itself only when the application explicitly calls Register.

Usage

package main

import (
    "github.com/kbukum/gokit/database"
    "github.com/kbukum/gokit/database/sqlite"
)

func configure() (*database.DriverRegistry, error) {
    registry := database.NewDriverRegistry()
    if err := sqlite.Register(registry); err != nil {
        return nil, err
    }
    return registry, nil
}

Importing this package has no side effects. Applications own the registry and choose the driver through configuration.

Documentation

Overview

Package sqlite provides the opt-in SQLite driver adapter for database tests and local development.

Importing this package has no side effects. Call Register with an explicit database.DriverRegistry before selecting it.

Index

Constants

View Source
const Name = "sqlite"

Variables

This section is empty.

Functions

func Open

func Open(dsn string) gorm.Dialector

Open returns a SQLite GORM dialector.

func Register

func Register(reg *database.DriverRegistry) error

Register registers the SQLite GORM driver in an explicit database registry.

Types

This section is empty.

Jump to

Keyboard shortcuts

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