Versions in this module Expand all Collapse all v3 v3.0.0 Aug 25, 2024 Changes in this version + func ConnectDB(connInfo *SQLConnectionInfo) (*sql.DB, error) + func DeleteTable(db *sql.DB, tableName string, databaseType DatabaseType) error + func DuplicateTable(db *sql.DB, originalTableName, newTableName string, databaseType DatabaseType) error + func EditRecord(db *sql.DB, tableName string, record TableRecord, updateColumn string, ...) error + func GetColumns(db *sql.DB, tableName string, databaseType DatabaseType) ([]string, error) + func GetPrimaryKeys(db *sql.DB, dbName, tableName string, databaseType DatabaseType) ([]string, error) + func GetTable(db *sql.DB, tableName string, dbType DatabaseType) ([]map[string]interface{}, error) + func GetTables(db *sql.DB, dbName string, dbType DatabaseType) ([]string, error) + func InsertRecord(db *sql.DB, tableName string, record TableRecord, databaseType DatabaseType) (int64, error) + func RemoveRecord(db *sql.DB, dbName, tableName string, databaseType DatabaseType, ...) (int64, error) + func RenameTable(db *sql.DB, oldTableName string, newTableName string, ...) error + type DatabaseType string + const CockroachDB + const MariaDB + const MySQL + const Oracle + const PostgreSQL + const SQLServer + const SQLite + type SQLConnectionInfo struct + DBName string + Host string + Passwd string + Port string + Type DatabaseType + User string + type TableRecord map[string]interface Other modules containing this package github.com/sgsavu/sqlutils github.com/sgsavu/sqlutils/v2 github.com/sgsavu/sqlutils/v4