schema

package
v0.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexTypePrimaryKey = IndexType(1)
	IndexTypeUnique     = IndexType(2)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	// contains filtered or unexported fields
}

func NewColumn

func NewColumn(table *Table, row *ColumnRow, convertNumberToInt64 bool) (*Column, error)

func (*Column) DataLength

func (column *Column) DataLength() int

func (*Column) DataPrecision

func (column *Column) DataPrecision() int

func (*Column) DataScale

func (column *Column) DataScale() int

func (*Column) DefaultDataPrecision

func (column *Column) DefaultDataPrecision() bool

func (*Column) DefaultDataScale

func (column *Column) DefaultDataScale() bool

func (*Column) FullName

func (column *Column) FullName() string

func (*Column) IsVirtual

func (column *Column) IsVirtual() bool

func (*Column) Key

func (column *Column) Key() bool

func (*Column) Name

func (column *Column) Name() string

func (*Column) Nullable

func (column *Column) Nullable() bool

func (*Column) OracleBaseType

func (column *Column) OracleBaseType() string

func (*Column) OracleName

func (column *Column) OracleName() string

func (*Column) OracleSQLName

func (column *Column) OracleSQLName() string

func (*Column) OracleSQLSelect

func (column *Column) OracleSQLSelect() (string, error)

func (*Column) OracleTable

func (column *Column) OracleTable() *Table

func (*Column) OracleType

func (column *Column) OracleType() string

func (*Column) Table

func (column *Column) Table() base.Table

func (*Column) ToOldColumn

func (column *Column) ToOldColumn() (*abstract.ColSchema, error)

func (*Column) Type

func (column *Column) Type() base.Type

func (*Column) Value

func (column *Column) Value(val interface{}) (base.Value, error)

type ColumnRow

type ColumnRow struct {
	SchemaName    string  `db:"OWNER"`
	TableName     string  `db:"TABLE_NAME"`
	ColumnName    string  `db:"COLUMN_NAME"`
	DataType      *string `db:"DATA_TYPE"`
	DataLength    int     `db:"DATA_LENGTH"`
	DataPrecision *int    `db:"DATA_PRECISION"`
	DataScale     *int    `db:"DATA_SCALE"`
	Nullable      *string `db:"NULLABLE"`
	Virtual       *string `db:"VIRTUAL_COLUMN"`
}

type Database

type Database struct {
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(sqlxDB *sqlx.DB, config *oracle.OracleSource, logger log.Logger) (*Database, error)

func (*Database) CLOBAsBLOB

func (db *Database) CLOBAsBLOB() (bool, error)

func (*Database) CLOBToBLOBFunctionExists

func (db *Database) CLOBToBLOBFunctionExists() bool

func (*Database) Config

func (db *Database) Config() *oracle.OracleSource

func (*Database) FullName

func (db *Database) FullName() string

func (*Database) LoadAllTables

func (db *Database) LoadAllTables() error

func (*Database) LoadMetadata

func (db *Database) LoadMetadata() error

func (*Database) LoadTable

func (db *Database) LoadTable(tableID *common.TableID) error

func (*Database) LoadTables

func (db *Database) LoadTables(tableIDs []*common.TableID, in bool) error

func (*Database) LoadTablesFromConfig

func (db *Database) LoadTablesFromConfig() error

func (*Database) Name

func (db *Database) Name() string

func (*Database) OracleSchema

func (db *Database) OracleSchema(i int) *Schema

func (*Database) OracleSchemaByName

func (db *Database) OracleSchemaByName(name string) *Schema

func (*Database) OracleTableByID

func (db *Database) OracleTableByID(tableID *common.TableID) *Table

func (*Database) SchemasCount

func (db *Database) SchemasCount() int

type Index

type Index struct {
	// contains filtered or unexported fields
}

func NewIndex

func NewIndex(table *Table, name string, typ IndexType) *Index

func (*Index) ColumnsCount

func (index *Index) ColumnsCount() int

func (*Index) FullName

func (index *Index) FullName() string

func (*Index) HasColumn

func (index *Index) HasColumn(column *Column) bool

func (*Index) Name

func (index *Index) Name() string

func (*Index) OracleName

func (index *Index) OracleName() string

func (*Index) OracleTable

func (index *Index) OracleTable() *Table

func (*Index) Type

func (index *Index) Type() IndexType

type IndexRow

type IndexRow struct {
	IndexName  string `db:"INDEX_NAME"`
	SchemaName string `db:"OWNER"`
	TableName  string `db:"TABLE_NAME"`
	ColumnName string `db:"COLUMN_NAME"`
}

type IndexType

type IndexType int

type NamesRow

type NamesRow struct {
	Name       string `db:"NAME"`
	UniqueName string `db:"DB_UNIQUE_NAME"`
	Role       string `db:"DATABASE_ROLE"`
}

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

func NewSchema

func NewSchema(repository *Database, schemaName string) *Schema

func (*Schema) FullName

func (schema *Schema) FullName() string

func (*Schema) Name

func (schema *Schema) Name() string

func (*Schema) OracleDatabase

func (schema *Schema) OracleDatabase() *Database

func (*Schema) OracleName

func (schema *Schema) OracleName() string

func (*Schema) OracleSQLName

func (schema *Schema) OracleSQLName() string

func (*Schema) OracleTable

func (schema *Schema) OracleTable(i int) *Table

func (*Schema) OracleTableByName

func (schema *Schema) OracleTableByName(name string) *Table

func (*Schema) TablesCount

func (schema *Schema) TablesCount() int

type Table

type Table struct {
	// contains filtered or unexported fields
}

func NewTable

func NewTable(schema *Schema, tableName string) *Table

func (*Table) Column

func (table *Table) Column(i int) base.Column

func (*Table) ColumnByName

func (table *Table) ColumnByName(name string) base.Column

func (*Table) ColumnsCount

func (table *Table) ColumnsCount() int

func (*Table) Database

func (table *Table) Database() string

func (*Table) FullName

func (table *Table) FullName() string

func (*Table) Name

func (table *Table) Name() string

func (*Table) OracleColumn

func (table *Table) OracleColumn(i int) *Column

func (*Table) OracleColumnByName

func (table *Table) OracleColumnByName(name string) *Column

func (*Table) OracleIndexByName

func (table *Table) OracleIndexByName(name string) *Index

func (*Table) OracleKeyIndex

func (table *Table) OracleKeyIndex() *Index

func (*Table) OracleName

func (table *Table) OracleName() string

func (*Table) OracleSQLName

func (table *Table) OracleSQLName() string

func (*Table) OracleSchema

func (table *Table) OracleSchema() *Schema

func (*Table) OracleTableID

func (table *Table) OracleTableID() *common.TableID

func (*Table) Schema

func (table *Table) Schema() string

func (*Table) ToOldTable

func (table *Table) ToOldTable() (*abstract.TableSchema, error)

type TableIDRow

type TableIDRow struct {
	SchemaName string `db:"OWNER"`
	TableName  string `db:"TABLE_NAME"`
}

Jump to

Keyboard shortcuts

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