models

package
v0.0.0-...-96f772b Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2016 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLiteTableRow

type SQLiteTableRow struct {
	Field string `db:"name"`
	Type  string `db:"type"`
}

type Schema

type Schema struct {
	Tables  []*Table `db:"Tables"`
	Adapter string
}

Schema represents a simplified database schema and possesses a list of Tables

func NewSchema

func NewSchema(adapter string) *Schema

NewSchema returns a new schema pointer with the Tables field initialized

type Table

type Table struct {
	Name string      `db:"Name"`
	Rows []*TableRow `db:"Rows"`
}

Table represents a sql Table with a Name and Rows, which give at least a Field Name and Type

type TableRow

type TableRow struct {
	Field   string      `db:"Field"`
	Type    string      `db:"Type"`
	Null    string      `db:"Null"`
	Key     string      `db:"Key"`
	Default interface{} `db:"Default"`
	Extra   string      `db:"Extra"`
}

TableRow represents a single row from a Table

Jump to

Keyboard shortcuts

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