logger

package
v0.0.0-...-5935107 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDbRelations

func InitDbRelations(logObjs *[]Logable)

Takes a slice of Logable objects and checks if there exists a table for that relation in the database schema. If no table exists a new table is created for each Logable object is created @param slice of Logable objects to check against

func SetDatabase

func SetDatabase(dbase *sql.DB, dbaseName string)

Setter for the database connection pointer that should be used for database interactions @param sql.DB pointer to the database which should be used for successive database interactions @param string name of the database

func StatementExecute

func StatementExecute(stmnt_string string)

Prepares and executes a given sql statement provided as string. @param string the mysql statement to execute

func TableExists

func TableExists(database, table string) bool

Queries the mysql information_schema database and check if an entry for the given (database,table) tuple exist @param database name @param table name @return true if entry for database.table exists in information_schema.tables Logable

Types

type Logable

type Logable interface {
	GetRelationName() string
	CreateRelation()
	Insert(...interface{})
	Delete(...interface{})
	Update(...interface{})
}

Jump to

Keyboard shortcuts

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