|
1 | 1 | import { ClientConfig } from 'pg'
|
2 |
| -import PostgresMetaColumn from './PostgresMetaColumn' |
| 2 | +import PostgresMetaColumns from './PostgresMetaColumns' |
3 | 3 | import PostgresMetaConfig from './PostgresMetaConfig'
|
4 |
| -import PostgresMetaExtension from './PostgresMetaExtension' |
5 |
| -import PostgresMetaFunction from './PostgresMetaFunction' |
6 |
| -import PostgresMetaPolicy from './PostgresMetaPolicy' |
7 |
| -import PostgresMetaPublication from './PostgresMetaPublication' |
8 |
| -import PostgresMetaRole from './PostgresMetaRole' |
9 |
| -import PostgresMetaSchema from './PostgresMetaSchema' |
10 |
| -import PostgresMetaTable from './PostgresMetaTable' |
11 |
| -import PostgresMetaType from './PostgresMetaType' |
| 4 | +import PostgresMetaExtensions from './PostgresMetaExtensions' |
| 5 | +import PostgresMetaFunctions from './PostgresMetaFunctions' |
| 6 | +import PostgresMetaPolicies from './PostgresMetaPolicies' |
| 7 | +import PostgresMetaPublications from './PostgresMetaPublications' |
| 8 | +import PostgresMetaRoles from './PostgresMetaRoles' |
| 9 | +import PostgresMetaSchemas from './PostgresMetaSchemas' |
| 10 | +import PostgresMetaTables from './PostgresMetaTables' |
| 11 | +import PostgresMetaTypes from './PostgresMetaTypes' |
12 | 12 | import PostgresMetaVersion from './PostgresMetaVersion'
|
13 | 13 | import { init } from './db'
|
14 | 14 | import { PostgresMetaResult } from './types'
|
15 | 15 |
|
16 | 16 | export default class PostgresMeta {
|
17 | 17 | query: (sql: string) => Promise<PostgresMetaResult<any>>
|
18 |
| - column: PostgresMetaColumn |
| 18 | + columns: PostgresMetaColumns |
19 | 19 | config: PostgresMetaConfig
|
20 |
| - extension: PostgresMetaExtension |
21 |
| - function: PostgresMetaFunction |
22 |
| - policy: PostgresMetaPolicy |
23 |
| - publication: PostgresMetaPublication |
24 |
| - role: PostgresMetaRole |
25 |
| - schema: PostgresMetaSchema |
26 |
| - table: PostgresMetaTable |
27 |
| - type: PostgresMetaType |
| 20 | + extensions: PostgresMetaExtensions |
| 21 | + functions: PostgresMetaFunctions |
| 22 | + policies: PostgresMetaPolicies |
| 23 | + publications: PostgresMetaPublications |
| 24 | + roles: PostgresMetaRoles |
| 25 | + schemas: PostgresMetaSchemas |
| 26 | + tables: PostgresMetaTables |
| 27 | + types: PostgresMetaTypes |
28 | 28 | version: PostgresMetaVersion
|
29 | 29 |
|
30 | 30 | constructor(config: ClientConfig) {
|
31 | 31 | this.query = init(config)
|
32 |
| - this.column = new PostgresMetaColumn(this.query) |
| 32 | + this.columns = new PostgresMetaColumns(this.query) |
33 | 33 | this.config = new PostgresMetaConfig(this.query)
|
34 |
| - this.extension = new PostgresMetaExtension(this.query) |
35 |
| - this.function = new PostgresMetaFunction(this.query) |
36 |
| - this.policy = new PostgresMetaPolicy(this.query) |
37 |
| - this.publication = new PostgresMetaPublication(this.query) |
38 |
| - this.role = new PostgresMetaRole(this.query) |
39 |
| - this.schema = new PostgresMetaSchema(this.query) |
40 |
| - this.table = new PostgresMetaTable(this.query) |
41 |
| - this.type = new PostgresMetaType(this.query) |
| 34 | + this.extensions = new PostgresMetaExtensions(this.query) |
| 35 | + this.functions = new PostgresMetaFunctions(this.query) |
| 36 | + this.policies = new PostgresMetaPolicies(this.query) |
| 37 | + this.publications = new PostgresMetaPublications(this.query) |
| 38 | + this.roles = new PostgresMetaRoles(this.query) |
| 39 | + this.schemas = new PostgresMetaSchemas(this.query) |
| 40 | + this.tables = new PostgresMetaTables(this.query) |
| 41 | + this.types = new PostgresMetaTypes(this.query) |
42 | 42 | this.version = new PostgresMetaVersion(this.query)
|
43 | 43 | }
|
44 | 44 | }
|
0 commit comments