database

package
Version: v0.0.0-...-45692f4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2015 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB(dbInfos *config.DBConnectInfos) (*gorm.DB, error)

Types

type Driver

type Driver struct {
	DB           *gorm.DB
	ConnectInfos *config.DBConnectInfos
}

func NewDriver

func NewDriver(DB *gorm.DB, ConnectInfos *config.DBConnectInfos) *Driver

func (*Driver) Close

func (d *Driver) Close()

func (*Driver) CreateIndex

func (d *Driver) CreateIndex(schema, tableName, indexName string) error

func (*Driver) CreateIndexWithScript

func (d *Driver) CreateIndexWithScript(script, schema, tableName, indexName string) error

func (*Driver) CreateSpatialIndex

func (d *Driver) CreateSpatialIndex(schema, tableName, indexName string) error

func (*Driver) CreateTable

func (d *Driver) CreateTable(schema, tableName string, params map[string]interface{}, dropIfExists bool) error

func (*Driver) DropTable

func (d *Driver) DropTable(schema, tableName string) error

func (*Driver) Exec

func (d *Driver) Exec(filename string, params ...string) error

func (*Driver) ExecQuery

func (d *Driver) ExecQuery(query string, params ...string) error

func (*Driver) Open

func (d *Driver) Open() (*sql.DB, error)

func (*Driver) PopulateTable

func (d *Driver) PopulateTable(schema string, tableName string)

func (*Driver) Raw

func (d *Driver) Raw(query string) *gorm.DB

type GTFSAgencyRepository

type GTFSAgencyRepository interface {
	GTFSCreatedModelRepository
}

type GTFSCalendarDateRepository

type GTFSCalendarDateRepository interface {
	GTFSCreatedModelRepository
}

type GTFSCalendarRepository

type GTFSCalendarRepository interface {
	GTFSCreatedModelRepository
}

type GTFSCreatedModelRepository

type GTFSCreatedModelRepository interface {
	GTFSModelRepository
	CreateTableByAgencyKey(agencyKey string, params map[string]interface{}) error
	AddIndexesByAgencyKey(agencyKey string) error
}

type GTFSGtfsAgencyRepository

type GTFSGtfsAgencyRepository interface {
	GTFSModelRepository
}

type GTFSModelRepository

type GTFSModelRepository interface {
	RemoveAllByAgencyKey(agencyKey string) error
	CreateImportTask(taskName string, jobIndex int, fileName, agencyKey string, headers []string, lines []byte, done chan error) tasks.Task
}

type GTFSRepository

type GTFSRepository interface {
	CreateSchema(agencyKey string) error
	GtfsAgencies() GTFSModelRepository
	Agencies() GTFSCreatedModelRepository
	CalendarDates() GTFSCreatedModelRepository
	Calendars() GTFSCreatedModelRepository
	Routes() GTFSCreatedModelRepository
	Stops() GTFSCreatedModelRepository
	StopTimes() GTFSCreatedModelRepository
	Transfers() GTFSCreatedModelRepository
	Trips() GTFSCreatedModelRepository
}

type GTFSRouteRepository

type GTFSRouteRepository interface {
	GTFSCreatedModelRepository
}

type GTFSStopRepository

type GTFSStopRepository interface {
	GTFSCreatedModelRepository
}

type GTFSStopTimeRepository

type GTFSStopTimeRepository interface {
	GTFSCreatedModelRepository
}

type GTFSTransferRepository

type GTFSTransferRepository interface {
	GTFSCreatedModelRepository
}

type GTFSTripRepository

type GTFSTripRepository interface {
	GTFSCreatedModelRepository
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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