sqlParser

package
v0.0.0-...-7d843e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

sqlParser.go interacts with database

Index

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

func ConnectToDatabase(username string, password string, environment string) sqlx.DB

connects to and returns a pointer to the database

func GetColumnNames

func GetColumnNames(tableName string) []string

returns array of column names from table in database

func GetColumnType

func GetColumnType(columnName string) string

returns array of column names from table in database

func GetColumnTypes

func GetColumnTypes(tableName string) []string

returns array of column names from table in database

func GetRows

func GetRows(tableName string, request string) *sqlx.Rows

returns *Rows from given table (name) from queried database

func GetTableNames

func GetTableNames() []string

returns array of table name strings from queried database

func MapColType

func MapColType(SQLType string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL