nervatura

package
v0.0.0-...-4b4c2ef Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Drivers []string

Drivers -> Nervatura linked database drivers

Functions

This section is empty.

Types

type IL

type IL = []interface{}

IL is a []interface{} type short alias

type IM

type IM = map[string]interface{}

IM is a map[string]interface{} type short alias

type SL

type SL = []string

SL is a []string type short alias

type SM

type SM = map[string]string

SM is a map[string]string type short alias

type SQLDriver

type SQLDriver struct {
	Config IM
	// contains filtered or unexported fields
}

SQLDriver a go database/sql DataDriver

func (*SQLDriver) BeginTransaction

func (ds *SQLDriver) BeginTransaction() (interface{}, error)

BeginTransaction begins a transaction and returns an *sql.Tx

func (*SQLDriver) CheckHashtable

func (ds *SQLDriver) CheckHashtable(hashtable string) error

CheckHashtable - check/create a password ref. table

func (*SQLDriver) CloseConnection

func (ds *SQLDriver) CloseConnection() error

func (*SQLDriver) CommitTransaction

func (ds *SQLDriver) CommitTransaction(trans interface{}) error

CommitTransaction commit a *sql.Tx transaction

func (*SQLDriver) Connection

func (ds *SQLDriver) Connection() struct {
	Alias     string
	Connected bool
	Engine    string
}

Connection - returns the database connection

func (*SQLDriver) CreateConnection

func (ds *SQLDriver) CreateConnection(alias, connStr string) error

CreateConnection create a new database connection

func (*SQLDriver) CreateDatabase

func (ds *SQLDriver) CreateDatabase(logData []SM) ([]SM, error)

CreateDatabase - create a Nervatura Database

func (*SQLDriver) Properties

func (ds *SQLDriver) Properties() struct{ SQL, Transaction bool }

Properties - DataDriver features

func (*SQLDriver) Query

func (ds *SQLDriver) Query(queries []nt.Query, trans interface{}) ([]IM, error)

Query is a basic nosql friendly queries the database

func (*SQLDriver) QueryKey

func (ds *SQLDriver) QueryKey(options IM, trans interface{}) (result []IM, err error)

QueryKey - complex data queries

func (*SQLDriver) QuerySQL

func (ds *SQLDriver) QuerySQL(sqlString string, params []interface{}, trans interface{}) ([]IM, error)

QuerySQL executes a SQL query

func (*SQLDriver) RollbackTransaction

func (ds *SQLDriver) RollbackTransaction(trans interface{}) error

RollbackTransaction rollback a *sql.Tx transaction

func (*SQLDriver) Update

func (ds *SQLDriver) Update(options nt.Update) (int64, error)

Update is a basic nosql friendly update/insert/delete and returns the update/insert id

func (*SQLDriver) UpdateHashtable

func (ds *SQLDriver) UpdateHashtable(hashtable, refname, value string) error

UpdateHashtable - set a password

Jump to

Keyboard shortcuts

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