sqlite

package
v0.9.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 11 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"

nolint: dupl // ignore false positive

nolint: dupl // ignore false positive of duplicate code

nolint: dupl // ignore false positive of duplicate code

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.

func WithAddress

func WithAddress(address string) ClientOpt

WithAddress sets the Sqlite address in the database client.

func WithCompressionLevel

func WithCompressionLevel(level int) ClientOpt

WithCompressionLevel sets the Sqlite compression level in the database client.

func WithConnectionIdle

func WithConnectionIdle(idle int) ClientOpt

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

func WithConnectionLife

func WithConnectionLife(duration time.Duration) ClientOpt

WithConnectionLife sets the Sqlite connection duration in the database client.

func WithConnectionOpen

func WithConnectionOpen(open int) ClientOpt

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

func WithEncryptionKey

func WithEncryptionKey(key string) ClientOpt

WithEncryptionKey sets the Sqlite encryption key in the database client.

func WithSkipCreation added in v0.9.0

func WithSkipCreation(skipCreation bool) ClientOpt

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

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