database

package
v0.0.0-...-25d2363 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCredentials

func RegisterCredentials(instanceID int64, data string) error

Register credentials for a specific database instance, replace if exist

Types

type Column

type Column struct {
	Field   string
	Type    string
	Null    string
	Key     string
	Default *string
	Extra   string
}

type DatabaseCredentials

type DatabaseCredentials struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	Name     string `json:"name"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type ExecutionResult

type ExecutionResult struct {
	LastInsertID int64
	AffectedRows int64
}

func Execute

func Execute(instanceID int64, statement string, args []interface{}) (*ExecutionResult, error)

type QueryResult

type QueryResult []map[string]string

func Query

func Query(instanceID int64, statement string, args []interface{}) (QueryResult, error)

type Table

type Table string

Jump to

Keyboard shortcuts

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