Documentation
¶
Index ¶
- type ColumnDefinition
- type ConstraintDefinition
- type DbClient
- type EnumDefinition
- type ForeignKeyDefinition
- type FunctionDefinition
- type IndexDefinition
- type MatViewDefinition
- type PostgresClient
- type PrivilegeDefinition
- type QueryResult
- type SchemaSnapshot
- type SequenceDefinition
- type TableDefinition
- type TriggerDefinition
- type TypeMeta
- type ViewDefinition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnDefinition ¶
type ColumnDefinition struct {
ColumnName string `db:"column_name" json:"column_name"`
DataType string `db:"data_type" json:"data_type"`
UDTName string `db:"udt_name" json:"udt_name"`
TypeMeta TypeMeta `db:"type_meta" json:"type_meta"`
IsNullable string `db:"is_nullable" json:"is_nullable"`
IsIdentity string `db:"is_identity" json:"is_identity"`
IsGenerated string `db:"is_generated" json:"is_generated"`
CollationName sql.NullString `db:"collation_name" json:"collation_name"`
IdentityGeneration sql.NullString `db:"identity_generation" json:"identity_generation"`
GenerationExpression sql.NullString `db:"generation_expression" json:"generation_expression"`
ColumnDefault sql.NullString `db:"column_default" json:"column_default"`
DateTimePrecision sql.NullInt64 `db:"datetime_precision" json:"datetime_precision"`
CharacterMaximumLength sql.NullInt64 `db:"character_maximum_length" json:"character_maximum_length"`
NumericPrecision sql.NullInt64 `db:"numeric_precision" json:"numeric_precision"`
NumericScale sql.NullInt64 `db:"numeric_scale" json:"numeric_scale"`
}
type ConstraintDefinition ¶
type ConstraintDefinition struct {
TableName string `db:"table_name" json:"table_name"`
ConstraintType string `db:"constraint_type" json:"constraint_type"`
Definition sql.NullString `db:"definition" json:"definition"`
}
type DbClient ¶
type DbClient interface {
Execute(query string, args ...interface{}) (*QueryResult, error)
Close() error
}
type EnumDefinition ¶
type EnumDefinition struct {
Labels []string `db:"labels" json:"labels"`
}
type ForeignKeyDefinition ¶
type ForeignKeyDefinition struct {
ConstraintName string `db:"constraint_name" json:"constraint_name"`
TableName string `db:"table_name" json:"table_name"`
ColumnName string `db:"column_name" json:"column_name"`
ForeignTableName string `db:"foreign_table_name" json:"foreign_table_name"`
ForeignColumnName string `db:"foreign_column_name" json:"foreign_column_name"`
UpdateRule string `db:"update_rule" json:"update_rule"`
DeleteRule string `db:"delete_rule" json:"delete_rule"`
}
type FunctionDefinition ¶
type IndexDefinition ¶
type IndexDefinition struct {
IndexDef string `db:"index_def" json:"index_def"`
}
type MatViewDefinition ¶ added in v0.3.0
type PostgresClient ¶
type PostgresClient struct {
// contains filtered or unexported fields
}
func NewPostgresClient ¶
func NewPostgresClient(postgresPath string) (*PostgresClient, error)
func (*PostgresClient) Close ¶
func (p *PostgresClient) Close() error
func (*PostgresClient) Execute ¶
func (p *PostgresClient) Execute(query string, args ...interface{}) (*QueryResult, error)
type PrivilegeDefinition ¶ added in v0.3.0
type QueryResult ¶
type SchemaSnapshot ¶
type SchemaSnapshot struct {
Tables map[string]TableDefinition `db:"tables" json:"tables"`
Views map[string]ViewDefinition `db:"views" json:"views"`
MatViews map[string]MatViewDefinition `db:"matviews" json:"matviews"`
Indexes map[string]IndexDefinition `db:"indexes" json:"indexes"`
Constraints map[string]ConstraintDefinition `db:"constraints" json:"constraints"`
EnumTypes map[string]EnumDefinition `db:"enum_types" json:"enum_types"`
ForeignKeys map[string]ForeignKeyDefinition `db:"foreign_keys" json:"foreign_keys"`
Triggers map[string]TriggerDefinition `db:"triggers" json:"triggers"`
Functions map[string]FunctionDefinition `db:"functions" json:"functions"`
Sequences map[string]SequenceDefinition `db:"sequences" json:"sequences"`
Privileges []PrivilegeDefinition `db:"privileges" json:"privileges"`
}
type SequenceDefinition ¶
type SequenceDefinition struct {
SequenceName string `db:"sequence_name" json:"sequence_name"`
DataType string `db:"data_type" json:"data_type"`
StartValue string `db:"start_value" json:"start_value"`
MinValue string `db:"min_value" json:"min_value"`
MaxValue string `db:"max_value" json:"max_value"`
Increment string `db:"increment" json:"increment"`
CycleOption string `db:"cycle_option" json:"cycle_option"`
}
type TableDefinition ¶
type TableDefinition struct {
Columns []ColumnDefinition `db:"columns" json:"columns"`
}
type TriggerDefinition ¶
type TriggerDefinition struct {
TriggerName string `db:"trigger_name" json:"trigger_name"`
EventManipulation string `db:"event_manipulation" json:"event_manipulation"`
EventObjectTable string `db:"event_object_table" json:"event_object_table"`
ActionTiming string `db:"action_timing" json:"action_timing"`
ActionStatement string `db:"action_statement" json:"action_statement"`
}
type ViewDefinition ¶
type ViewDefinition struct {
Definition string `db:"definition" json:"definition"`
}
Click to show internal directories.
Click to hide internal directories.