database

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecSQL

func ExecSQL(query string, args ...SQLTypes) error

Query example: To insert a new record could be done like below err := database.ExecSQL("INSERT INTO table (ID) VALUES (?);", database.Int32(0))

func Get

func Get(key string) ([]byte, error)

func QuerySQL

func QuerySQL(query string, args ...SQLTypes) ([]byte, error)

Query example: To query a new record could be done like below result, err := database.QuerySQL("SELECT * FROM table WHERE ID =?;", database.Int32(0))

func Set

func Set(key string, value []byte) error

Types

type SQLTypes

type SQLTypes interface {
	// contains filtered or unexported methods
}

func Bool

func Bool(in bool) SQLTypes

func Bytes

func Bytes(in []byte) SQLTypes

func Float32

func Float32(in float32) SQLTypes

func Float64

func Float64(in float64) SQLTypes

func Int32

func Int32(in int32) SQLTypes

func Int64

func Int64(in int64) SQLTypes

func String

func String(in string) SQLTypes

Jump to

Keyboard shortcuts

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