Documentation ¶
Overview ¶
sqlParser.go interacts with database
Index ¶
- Variables
- func ConnectToDatabase(username string, password string, environment string) sqlx.DB
- func GetColumnNames(tableName string) []string
- func GetColumnType(columnName string) string
- func GetColumnTypes(tableName string) []string
- func GetRows(tableName string, request string) *sqlx.Rows
- func GetTableNames() []string
- func MapColType(SQLType string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var SQLTypeMap = map[string]string{
"bigint": "int64",
"int": "int32",
"integer": "int32",
"tinyint": "uint8",
"double": "float64",
"varchar": "string",
}
Functions ¶
func ConnectToDatabase ¶
connects to and returns a pointer to the database
func GetColumnNames ¶
returns array of column names from table in database
func GetColumnType ¶
returns array of column names from table in database
func GetColumnTypes ¶
returns array of column names from table in database
func GetTableNames ¶
func GetTableNames() []string
returns array of table name strings from queried database
func MapColType ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.