dbms

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	NullDB     = iota // zero, so no "default" database allowed
	PostgreSQL = iota
	SQLite     = iota
	MariaDB    = iota
	MySQL      = iota
	Oracle     = iota
	MSSQL      = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DBMS

type DBMS struct {
	Connection *sql.DB
	// contains filtered or unexported fields
}

func Init

func Init(db *sql.DB, id int) (DBMS, error)

func (*DBMS) CheckConstraints

func (db *DBMS) CheckConstraints(schemaName, tableName string) ([]m.CheckConstraint, error)

CheckConstraints returns a slice of Check Constraints for the (schemaName, tableName) parameters

func (*DBMS) CloseDB

func (db *DBMS) CloseDB() error

CloseDB closes a DB reference

func (*DBMS) Columns

func (db *DBMS) Columns(schemaName, tableName string) ([]m.Column, error)

Columns returns a slice of Columns for the (schemaName, tableName) parameters

func (*DBMS) CurrentCatalog

func (db *DBMS) CurrentCatalog() (m.Catalog, error)

CurrentCatalog returns the current catalog

func (*DBMS) Dependencies

func (db *DBMS) Dependencies(schemaName, objectName string) ([]m.Dependency, error)

Dependencies returns a slice of Dependecies for the (schemaName, objectName) parameters

func (*DBMS) Domains

func (db *DBMS) Domains(schemaName string) ([]m.Domain, error)

Domains returns a slice of Domains for the (schemaName) parameter

func (*DBMS) ID

func (db *DBMS) ID() int

func (*DBMS) Indexes

func (db *DBMS) Indexes(schemaName, tableName string) ([]m.Index, error)

Indexes returns a slice of Indexes for the (schemaName, tableName) parameters

func (*DBMS) Name

func (db *DBMS) Name() string

func (*DBMS) PrimaryKeys

func (db *DBMS) PrimaryKeys(schemaName, tableName string) ([]m.PrimaryKey, error)

PrimaryKeys returns a slice of primary keys for the (schemaName, tableName) parameters

func (*DBMS) ReferentialConstraints

func (db *DBMS) ReferentialConstraints(schemaName, tableName string) ([]m.ReferentialConstraint, error)

ReferentialConstraints returns a slice of Referential Constraints for the (schemaName, tableName) parameters

func (*DBMS) Schemata

func (db *DBMS) Schemata(nclude, xclude string) ([]m.Schema, error)

Schemata returns a slice of Schemas, optionally filtered on the (nclude, xclude) parameters

func (*DBMS) Tables

func (db *DBMS) Tables(schemaName string) ([]m.Table, error)

Tables returns a slice of Tables for the (schema) parameter

func (*DBMS) Types

func (db *DBMS) Types(schemaName string) ([]m.Type, error)

Types returns a slice of Types for the (schema) parameter

func (*DBMS) UniqueConstraints

func (db *DBMS) UniqueConstraints(schemaName, tableName string) ([]m.UniqueConstraint, error)

UniqueConstraints returns a slice of Unique Constraints for the (schemaName, tableName) parameters

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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