Documentation ¶
Index ¶
- type DB
- func (d DB) Close(db *sql.DB)
- func (d DB) CreateTable(db *sql.DB, tableName string, items string)
- func (d DB) DeleteTable(db *sql.DB, tableName string)
- func (d DB) Find(db *sql.DB, tableName string, findColumn string, where string) map[string]interface{}
- func (d DB) GenericQuery(db *sql.DB, query string, args ...interface{}) ([]map[string]interface{}, error)
- func (d DB) InsertInto(db *sql.DB, tableName string, column string, args ...interface{})
- func (d DB) InsertQuery(db *sql.DB, tableName string, column string, values string)
- func (d DB) Open(dataSourceName string) *sql.DB
- func (d DB) Query(db *sql.DB, query string)
- func (d DB) Select(db *sql.DB, tableName string) []map[string]interface{}
- func (d DB) SelectAll(db *sql.DB, tableName string)
- func (d DB) Update(db *sql.DB, tableName string, column string, changeValue string, ...)
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) CreateTable ¶
CreateTable
func (DB) DeleteTable ¶
██████╗ ███████╗██╗ ███████╗████████╗███████╗ ████████╗ █████╗ ██████╗ ██╗ ███████╗ ██╔══██╗██╔════╝██║ ██╔════╝╚══██╔══╝██╔════╝ ╚══██╔══╝██╔══██╗██╔══██╗██║ ██╔════╝ ██║ ██║█████╗ ██║ █████╗ ██║ █████╗ ██║ ███████║██████╔╝██║ █████╗ ██║ ██║██╔══╝ ██║ ██╔══╝ ██║ ██╔══╝ ██║ ██╔══██║██╔══██╗██║ ██╔══╝ ██████╔╝███████╗███████╗███████╗ ██║ ███████╗ ██║ ██║ ██║██████╔╝███████╗███████╗ ╚═════╝ ╚══════╝╚══════╝╚══════╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═════╝ ╚══════╝╚══════╝
DeleteTable is
func (DB) GenericQuery ¶
func (DB) InsertInto ¶
func (DB) InsertQuery ¶
func (DB) Open ¶
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")