Documentation ¶
Index ¶
- type Driver
- type MySQL
- func (db *MySQL) Connect(urlstr string) (err error)
- func (db *MySQL) DeleteRecord(table, primaryKeyColumnName, primaryKeyValue string) error
- func (db *MySQL) ExecuteDMLStatement(query string) (result string, err error)
- func (db *MySQL) ExecutePendingChanges(changes []models.DbDmlChange, inserts []models.DbInsert) (err error)
- func (db *MySQL) ExecuteQuery(query string) (results [][]string, err error)
- func (db *MySQL) GetConstraints(table string) (results [][]string, err error)
- func (db *MySQL) GetDatabases() ([]string, error)
- func (db *MySQL) GetForeignKeys(table string) (results [][]string, err error)
- func (db *MySQL) GetIndexes(table string) (results [][]string, err error)
- func (db *MySQL) GetProvider() string
- func (db *MySQL) GetRecords(table, where, sort string, offset, limit int) (paginatedResults [][]string, totalRecords int, err error)
- func (db *MySQL) GetTableColumns(database, table string) (results [][]string, err error)
- func (db *MySQL) GetTables(database string) (map[string][]string, error)
- func (db *MySQL) SetProvider(provider string)
- func (db *MySQL) TestConnection(urlstr string) (err error)
- func (db *MySQL) UpdateRecord(table, column, value, primaryKeyColumnName, primaryKeyValue string) error
- type Postgres
- func (db *Postgres) Connect(urlstr string) (err error)
- func (db *Postgres) DeleteRecord(table, primaryKeyColumnName, primaryKeyValue string) (err error)
- func (db *Postgres) ExecuteDMLStatement(query string) (result string, err error)
- func (db *Postgres) ExecutePendingChanges(changes []models.DbDmlChange, inserts []models.DbInsert) (err error)
- func (db *Postgres) ExecuteQuery(query string) (results [][]string, err error)
- func (db *Postgres) GetConstraints(table string) (constraints [][]string, error error)
- func (db *Postgres) GetDatabases() (databases []string, err error)
- func (db *Postgres) GetForeignKeys(table string) (foreignKeys [][]string, error error)
- func (db *Postgres) GetIndexes(table string) (indexes [][]string, error error)
- func (db *Postgres) GetProvider() string
- func (db *Postgres) GetRecords(table, where, sort string, offset, limit int) (records [][]string, totalRecords int, err error)
- func (db *Postgres) GetTableColumns(database, table string) (results [][]string, error error)
- func (db *Postgres) GetTables(database string) (tables map[string][]string, err error)
- func (db *Postgres) SetProvider(provider string)
- func (db *Postgres) TestConnection(urlstr string) error
- func (db *Postgres) UpdateRecord(table, column, value, primaryKeyColumnName, primaryKeyValue string) (err error)
- type SQLite
- func (db *SQLite) Connect(urlstr string) (err error)
- func (db *SQLite) DeleteRecord(table, primaryKeyColumnName, primaryKeyValue string) error
- func (db *SQLite) ExecuteDMLStatement(query string) (result string, err error)
- func (db *SQLite) ExecutePendingChanges(changes []models.DbDmlChange, inserts []models.DbInsert) (err error)
- func (db *SQLite) ExecuteQuery(query string) (results [][]string, err error)
- func (db *SQLite) GetConstraints(table string) (results [][]string, err error)
- func (db *SQLite) GetDatabases() ([]string, error)
- func (db *SQLite) GetForeignKeys(table string) (results [][]string, err error)
- func (db *SQLite) GetIndexes(table string) (results [][]string, err error)
- func (db *SQLite) GetProvider() string
- func (db *SQLite) GetRecords(table, where, sort string, offset, limit int) (paginatedResults [][]string, totalRecords int, err error)
- func (db *SQLite) GetTableColumns(database, table string) (results [][]string, err error)
- func (db *SQLite) GetTables(database string) (map[string][]string, error)
- func (db *SQLite) SetProvider(provider string)
- func (db *SQLite) TestConnection(urlstr string) (err error)
- func (db *SQLite) UpdateRecord(table, column, value, primaryKeyColumnName, primaryKeyValue string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶ added in v0.1.3
type Driver interface { Connect(urlstr string) error TestConnection(urlstr string) error GetDatabases() ([]string, error) GetTables(database string) (map[string][]string, error) GetTableColumns(database, table string) ([][]string, error) GetConstraints(table string) ([][]string, error) GetForeignKeys(table string) ([][]string, error) GetIndexes(table string) ([][]string, error) GetRecords(table, where, sort string, offset, limit int) ([][]string, int, error) UpdateRecord(table, column, value, primaryKeyColumnName, primaryKeyValue string) error DeleteRecord(table string, primaryKeyColumnName, primaryKeyValue string) error ExecuteDMLStatement(query string) (string, error) ExecuteQuery(query string) ([][]string, error) ExecutePendingChanges(changes []models.DbDmlChange, inserts []models.DbInsert) error SetProvider(provider string) GetProvider() string }
type MySQL ¶ added in v0.1.3
func (*MySQL) DeleteRecord ¶ added in v0.1.3
TODO: Rewrites this logic to use the primary key instead of the id
func (*MySQL) ExecuteDMLStatement ¶ added in v0.1.3
func (*MySQL) ExecutePendingChanges ¶ added in v0.1.3
func (*MySQL) ExecuteQuery ¶ added in v0.1.3
func (*MySQL) GetConstraints ¶ added in v0.1.3
func (*MySQL) GetDatabases ¶ added in v0.1.3
func (*MySQL) GetForeignKeys ¶ added in v0.1.3
func (*MySQL) GetIndexes ¶ added in v0.1.3
func (*MySQL) GetProvider ¶ added in v0.1.3
func (*MySQL) GetRecords ¶ added in v0.1.3
func (*MySQL) GetTableColumns ¶ added in v0.1.3
func (*MySQL) SetProvider ¶ added in v0.1.3
func (*MySQL) TestConnection ¶ added in v0.1.3
func (*MySQL) UpdateRecord ¶ added in v0.1.3
func (db *MySQL) UpdateRecord(table, column, value, primaryKeyColumnName, primaryKeyValue string) error
TODO: Rewrites this logic to use the primary key instead of the id
type Postgres ¶ added in v0.1.3
func (*Postgres) DeleteRecord ¶ added in v0.1.3
func (*Postgres) ExecuteDMLStatement ¶ added in v0.1.3
func (*Postgres) ExecutePendingChanges ¶ added in v0.1.3
func (*Postgres) ExecuteQuery ¶ added in v0.1.3
func (*Postgres) GetConstraints ¶ added in v0.1.3
func (*Postgres) GetDatabases ¶ added in v0.1.3
func (*Postgres) GetForeignKeys ¶ added in v0.1.3
func (*Postgres) GetIndexes ¶ added in v0.1.3
func (*Postgres) GetProvider ¶ added in v0.1.3
func (*Postgres) GetRecords ¶ added in v0.1.3
func (*Postgres) GetTableColumns ¶ added in v0.1.3
func (*Postgres) SetProvider ¶ added in v0.1.3
func (*Postgres) TestConnection ¶ added in v0.1.3
func (*Postgres) UpdateRecord ¶ added in v0.1.3
type SQLite ¶ added in v0.1.3
func (*SQLite) DeleteRecord ¶ added in v0.1.3
func (*SQLite) ExecuteDMLStatement ¶ added in v0.1.3
func (*SQLite) ExecutePendingChanges ¶ added in v0.1.3
func (*SQLite) ExecuteQuery ¶ added in v0.1.3
func (*SQLite) GetConstraints ¶ added in v0.1.3
func (*SQLite) GetDatabases ¶ added in v0.1.3
func (*SQLite) GetForeignKeys ¶ added in v0.1.3
func (*SQLite) GetIndexes ¶ added in v0.1.3
func (*SQLite) GetProvider ¶ added in v0.1.3
func (*SQLite) GetRecords ¶ added in v0.1.3
func (*SQLite) GetTableColumns ¶ added in v0.1.3
func (*SQLite) SetProvider ¶ added in v0.1.3
func (*SQLite) TestConnection ¶ added in v0.1.3
func (*SQLite) UpdateRecord ¶ added in v0.1.3
Click to show internal directories.
Click to hide internal directories.