NewSchemaReader - Creates a new SchemaReader
(database *db.Postgres)
| 27 | |
| 28 | // NewSchemaReader - Creates a new SchemaReader |
| 29 | func NewSchemaReader(database *db.Postgres) *SchemaReader { |
| 30 | return &SchemaReader{ |
| 31 | database: database, |
| 32 | txOptions: pgx.TxOptions{IsoLevel: pgx.ReadCommitted, AccessMode: pgx.ReadOnly}, |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | // ReadSchema returns the schema definition for a specific tenant and version as a structured object. |
| 37 | func (r *SchemaReader) ReadSchema(ctx context.Context, tenantID, version string) (sch *base.SchemaDefinition, err error) { |
no outgoing calls
no test coverage detected