databasecenter

package
v0.0.0-...-e633676 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct{}

The DB was created to use the functions of the database center package.

func (DB) Close

func (d DB) Close(db *sql.DB)

Close is

func (DB) CreateTable

func (d DB) CreateTable(db *sql.DB, tableName string, items string)

CreateTable

func (DB) DeleteTable

func (d DB) DeleteTable(db *sql.DB, tableName string)

██████╗ ███████╗██╗ ███████╗████████╗███████╗ ████████╗ █████╗ ██████╗ ██╗ ███████╗ ██╔══██╗██╔════╝██║ ██╔════╝╚══██╔══╝██╔════╝ ╚══██╔══╝██╔══██╗██╔══██╗██║ ██╔════╝ ██║ ██║█████╗ ██║ █████╗ ██║ █████╗ ██║ ███████║██████╔╝██║ █████╗ ██║ ██║██╔══╝ ██║ ██╔══╝ ██║ ██╔══╝ ██║ ██╔══██║██╔══██╗██║ ██╔══╝ ██████╔╝███████╗███████╗███████╗ ██║ ███████╗ ██║ ██║ ██║██████╔╝███████╗███████╗ ╚═════╝ ╚══════╝╚══════╝╚══════╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═════╝ ╚══════╝╚══════╝

DeleteTable is

func (DB) Find

func (d DB) Find(db *sql.DB, tableName string, findColumn string, where string) map[string]interface{}

func (DB) GenericQuery

func (d DB) GenericQuery(db *sql.DB, query string, args ...interface{}) ([]map[string]interface{}, error)

func (DB) InsertInto

func (d DB) InsertInto(db *sql.DB, tableName string, column string, args ...interface{})

func (DB) InsertQuery

func (d DB) InsertQuery(db *sql.DB, tableName string, column string, values string)

func (DB) Open

func (d DB) Open(dataSourceName string) *sql.DB

Open function is used to open and use a database. This function returns data as "* sql.DB". Through this data, transactions are carried out. The returned data is a ready-to-use database. If a named database does not exist on the specified path, it creates a new database.

For Use Example :
   db := dataBase.Open("foo.db")

func (DB) Query

func (d DB) Query(db *sql.DB, query string)

Query is

func (DB) Select

func (d DB) Select(db *sql.DB, tableName string) []map[string]interface{}

Select is

func (DB) SelectAll

func (d DB) SelectAll(db *sql.DB, tableName string)

func (DB) Update

func (d DB) Update(db *sql.DB, tableName string, column string, changeValue string, whereColumn string, where string)

Update is

Jump to

Keyboard shortcuts

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