Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FieldDatabaseName define database name FieldDatabaseName = "datname" // FieldSchemaName define schema name FieldSchemaName = "schema_name" // FieldCountDatabaseName count by database name FieldCountDatabaseName = "COUNT(datname)" // FieldCountSchemaName count by schema name FieldCountSchemaName = "COUNT(schema_name)" // DatabasesSelect clause DatabasesSelect = ` SELECT %s FROM pg_database` // DatabasesWhere clause DatabasesWhere = ` WHERE NOT datistemplate` // DatabasesOrderBy clause DatabasesOrderBy = ` ORDER BY %s ASC` // SchemasSelect clause SchemasSelect = ` SELECT %s FROM information_schema.schemata` // SchemasGroupBy clause SchemasGroupBy = ` GROUP BY %s` // SchemasOrderBy clause SchemasOrderBy = ` ORDER BY %s ASC` // TablesSelect clause TablesSelect = `` /* 420-byte string literal not displayed */ // TablesWhere clause TablesWhere = `` /* 181-byte string literal not displayed */ // TablesOrderBy clause TablesOrderBy = ` ORDER BY 1, 2` // Tables default query Tables = TablesSelect + TablesWhere + TablesOrderBy // SchemaTablesSelect clause SchemaTablesSelect = `` /* 194-byte string literal not displayed */ // SchemaTablesWhere clause SchemaTablesWhere = ` WHERE sc.catalog_name = $1 AND t.schemaname = $2` // SchemaTablesOrderBy clause SchemaTablesOrderBy = ` ORDER BY t.tablename ASC` // SchemaTables default query SchemaTables = SchemaTablesSelect + SchemaTablesWhere + SchemaTablesOrderBy // SelectInTable default query SelectInTable = ` SELECT * FROM` // InsertQuery query InsertQuery = `INSERT INTO "%s"."%s"."%s"(%s) VALUES%s` // DeleteQuery query DeleteQuery = `DELETE FROM "%s"."%s"."%s"` // UpdateQuery query UpdateQuery = `UPDATE "%s"."%s"."%s" SET %s` // GroupBy query GroupBy = `GROUP BY %s` // Having query Having = `HAVING %s %s %s` )
Variables ¶
View Source
var ( // Databases default query Databases = fmt.Sprintf(DatabasesSelect, FieldDatabaseName) + DatabasesWhere + fmt.Sprintf(DatabasesOrderBy, FieldDatabaseName) // Schemas default query Schemas = fmt.Sprintf(SchemasSelect, FieldSchemaName) + fmt.Sprintf(SchemasOrderBy, FieldSchemaName) )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.