sqlitereldb

package
v0.0.0-...-9a5c20e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: BSD-3-Clause Imports: 4 Imported by: 1

README

sqlitereldb

import "github.com/blueprint-uservices/blueprint/runtime/plugins/sqlitereldb"

Package sqlitereldb implements a [backend.RelationalDB] using the in-memory Golang SQLite package github.com/mattn/go\-sqlite3.

If you are directly running go code (e.g. not from a docker container), the go-sqlite3 package requires CGO_ENABLED=1 and you must have gcc installed. See [https://github.com/mattn/go-sqlite3] for more details about installation instructions.

Index

type SqliteRelDB

An in-memory relational DB that uses the go-sqlite3 package

type SqliteRelDB struct {
    // contains filtered or unexported fields
}

func NewSqliteRelDB
func NewSqliteRelDB(ctx context.Context) (*SqliteRelDB, error)

Instantiates a new SqliteRelDB instance that stores query data in-memory

func (*SqliteRelDB) Exec
func (s *SqliteRelDB) Exec(ctx context.Context, query string, args ...any) (sql.Result, error)

Exec implements backend.RelationalDB.

func (*SqliteRelDB) Get
func (s *SqliteRelDB) Get(ctx context.Context, dst interface{}, query string, args ...any) error

Get implements backend.RelationalDB.

func (*SqliteRelDB) Prepare
func (s *SqliteRelDB) Prepare(ctx context.Context, query string) (*sql.Stmt, error)

Prepare implements backend.RelationalDB.

func (*SqliteRelDB) Query
func (s *SqliteRelDB) Query(ctx context.Context, query string, args ...any) (*sql.Rows, error)

Query implements backend.RelationalDB.

func (*SqliteRelDB) Select
func (s *SqliteRelDB) Select(ctx context.Context, dst interface{}, query string, args ...any) error

Select implements backend.RelationalDB.

Generated by gomarkdoc

Documentation

Overview

Package sqlitereldb implements a [backend.RelationalDB] using the in-memory Golang SQLite package github.com/mattn/go-sqlite3.

If you are directly running go code (e.g. not from a docker container), the go-sqlite3 package requires CGO_ENABLED=1 and you must have gcc installed. See [https://github.com/mattn/go-sqlite3] for more details about installation instructions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SqliteRelDB

type SqliteRelDB struct {
	// contains filtered or unexported fields
}

An in-memory relational DB that uses the go-sqlite3 package

func NewSqliteRelDB

func NewSqliteRelDB(ctx context.Context) (*SqliteRelDB, error)

Instantiates a new SqliteRelDB instance that stores query data in-memory

func (*SqliteRelDB) Exec

func (s *SqliteRelDB) Exec(ctx context.Context, query string, args ...any) (sql.Result, error)

Exec implements backend.RelationalDB.

func (*SqliteRelDB) Get

func (s *SqliteRelDB) Get(ctx context.Context, dst interface{}, query string, args ...any) error

Get implements backend.RelationalDB.

func (*SqliteRelDB) Prepare

func (s *SqliteRelDB) Prepare(ctx context.Context, query string) (*sql.Stmt, error)

Prepare implements backend.RelationalDB.

func (*SqliteRelDB) Query

func (s *SqliteRelDB) Query(ctx context.Context, query string, args ...any) (*sql.Rows, error)

Query implements backend.RelationalDB.

func (*SqliteRelDB) Select

func (s *SqliteRelDB) Select(ctx context.Context, dst interface{}, query string, args ...any) error

Select implements backend.RelationalDB.

Jump to

Keyboard shortcuts

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