sqlite

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package sqlite provides the ability for Vela to integrate with Sqlite as a SQL backend.

Usage:

import "github.com/go-vela/server/database/sqlite"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...ClientOpt) (*client, error)

New returns a Database implementation that integrates with a Sqlite instance.

nolint: revive // ignore returning unexported client

func NewTest

func NewTest() (*client, error)

NewTest returns a Database implementation that integrates with a fake Sqlite instance.

This function is intended for running tests only.

nolint: revive // ignore returning unexported client

Types

type ClientOpt

type ClientOpt func(*client) error

ClientOpt represents a configuration option to initialize the database client for Sqlite.

func WithAddress

func WithAddress(address string) ClientOpt

WithAddress sets the Sqlite address in the database client for Sqlite.

func WithCompressionLevel

func WithCompressionLevel(level int) ClientOpt

WithCompressionLevel sets the compression level in the database client for Sqlite.

func WithConnectionIdle

func WithConnectionIdle(idle int) ClientOpt

WithConnectionIdle sets the maximum idle connections in the database client for Sqlite.

func WithConnectionLife

func WithConnectionLife(duration time.Duration) ClientOpt

WithConnectionLife sets the connection duration in the database client for Sqlite.

func WithConnectionOpen

func WithConnectionOpen(open int) ClientOpt

WithConnectionOpen sets the maximum open connections in the database client for Sqlite.

func WithEncryptionKey

func WithEncryptionKey(key string) ClientOpt

WithEncryptionKey sets the encryption key in the database client for Sqlite.

func WithSkipCreation added in v0.9.0

func WithSkipCreation(skipCreation bool) ClientOpt

WithSkipCreation sets the skip creation logic in the database client for Sqlite.

Directories

Path Synopsis
Package ddl provides the Sqlite data definition language (DDL) for Vela.
Package ddl provides the Sqlite data definition language (DDL) for Vela.
Package dml provides the Sqlite data manipulation language (DML) for Vela.
Package dml provides the Sqlite data manipulation language (DML) for Vela.

Jump to

Keyboard shortcuts

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