Documentation ¶
Index ¶
- Variables
- type Column
- type Database
- func (db *Database) AlterTable(databaseName, tableName string, tableData *Table) error
- func (db *Database) CheckDatabaseExists(databaseName string) (bool, error)
- func (db *Database) CheckTableExists(databaseName, tableName string) (bool, error)
- func (db *Database) Close() error
- func (db *Database) CreateDatabase(databaseName string) error
- func (db *Database) CreateTable(databaseName string, tableData *Table) error
- func (db *Database) DeleteDatabase(databaseName string) error
- func (db *Database) DeleteTable(databaseName, tableName string) error
- func (db *Database) GetTableData(databaseName, tableName string) ([]map[string]interface{}, error)
- type Table
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Mariadb *gorm.DB
)
Functions ¶
This section is empty.
Types ¶
type Database ¶
Database represents a database connection
func (*Database) AlterTable ¶
AlterTable alters an existing table in the specified database
func (*Database) CheckDatabaseExists ¶
CheckDatabaseExists checks if the specified database exists
func (*Database) CheckTableExists ¶
CheckTableExists checks if the specified table exists in the database
func (*Database) CreateDatabase ¶
CreateDatabase creates a new database with the given name
func (*Database) CreateTable ¶
CreateTable creates a new table in the specified database
func (*Database) DeleteDatabase ¶
DeleteDatabase deletes the specified database
func (*Database) DeleteTable ¶
DeleteTable deletes an existing table from the specified database
Click to show internal directories.
Click to hide internal directories.