Documentation ¶
Overview ¶
Copyright 2021 SANGFOR TECHNOLOGIES
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type MysqlBackend
- func (m *MysqlBackend) Config(option map[string]interface{})
- func (m *MysqlBackend) CreateDatabase() (err error)
- func (m *MysqlBackend) DBHandler() (db *sql.DB, err error)
- func (m *MysqlBackend) DeployCheck() (string, bool)
- func (m *MysqlBackend) SchemaInit(schema []string)
- func (m *MysqlBackend) StatementDialect(statement string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlBackend ¶
type MysqlBackend struct { }
func (*MysqlBackend) Config ¶
func (m *MysqlBackend) Config(option map[string]interface{})
Config nothing to do here
func (*MysqlBackend) CreateDatabase ¶
func (m *MysqlBackend) CreateDatabase() (err error)
CreateDatabase create database given in config.
func (*MysqlBackend) DBHandler ¶
func (m *MysqlBackend) DBHandler() (db *sql.DB, err error)
DBHandler get client for mysql.
func (*MysqlBackend) DeployCheck ¶
func (m *MysqlBackend) DeployCheck() (string, bool)
DeployCheck checks if given version has already been deployed If there's another error to this, like DB gone bad, then we're about to find out anyway.
func (*MysqlBackend) SchemaInit ¶
func (m *MysqlBackend) SchemaInit(schema []string)
SchemaInit will issue given sql queries that are not already known to be deployed. This iterates both lists (to-run and already-deployed) and also verifies no contraditions.
func (*MysqlBackend) StatementDialect ¶
func (m *MysqlBackend) StatementDialect(statement string) (string, error)
StatementDialect nothing to do for mysql