sqlite

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: MIT Imports: 7 Imported by: 0

README

database/sqlite

Enable

liquor app enable database/sqlite
# or
go get github.com/go-liquor/liquor-sdk/modules/database/sqlite

in cmd/app/main.go add module

package main

import (
	"github.com/go-liquor/framework/internal/adapters/server/http"
	"github.com/go-liquor/framework/internal/app/services"
	"github.com/go-liquor/liquor-sdk/app"
    "github.com/go-liquor/liquor-sdk/modules/database/sqlite" // add this
)

func main() {
	app.NewApp(
        sqlite.DatabaseSqliteModule, // add this
		http.Server,
		app.RegisterService(
			services.NewInitialService,
		),
	)
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DatabaseSqliteModule = fx.Module("liquor-database-sqlite", fx.Provide(
	NewConnection,
))

Functions

func NewConnection

func NewConnection(config *config.Config, logger *zap.Logger) *bun.DB

NewConnection create a new connection to sqlite database

Returns: - *bun.DB: a new connection to sqlite database

Types

This section is empty.

Jump to

Keyboard shortcuts

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