db

package
v0.0.0-...-1b5978a Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB = initializeDb()

Functions

func Query

func Query(query string, cb func(rows sql.Rows))
  • @param query: Simple SQL query @param rows: Callback function. Can look like this:

    err := rows.Scan(&id, &name) if err != nil { log.Fatal(err) } log.Println(id, name)

func SecureQuery

func SecureQuery(escapedQuery string, cb func(rows sql.Rows), args ...interface{})

*

@param escapedQuery: e.g.: select id, name from users where id = ?
@param args: Your params for your escaped query.

Types

This section is empty.

Jump to

Keyboard shortcuts

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