Appearance
PostgreSqlGenerator Class
Definition
Provides SQL Generation routines for a PostgreSQL database
- Namespace:
JASE.Database.SqlGenerators - Assembly:
JASE.Database.dll
Constructors
| Name | Description |
|---|---|
PostgreSqlGenerator(ISqlGeneratorOptions options = null) | Create an Sql Generator for a PostgreSQL database |
Properties
| Name | Description |
|---|---|
IsCiTextAvailable | Returns if the CITEXT extension is known to be installed |
IsPgVectorAvailable | Returns if the pgvector extension is known to be installed |
Type | Type of Datatype this Generator is for |
Methods
| Name | Description |
|---|---|
ISqlStatement AcquireDatabaseLock(string resource, DatabaseLockMode mode, DatabaseLockOwner owner) | Generates a non-blocking attempt to acquire a database-backed application lock. The scalar result is 1 when acquired, 0 when contended, or a negative provider error code. |
string AlterTable(ITableInfo table, TableDifferences differences) | Generate an ALTER TABLE statement based on derived TableDifferences |
string CreateIndex(IndexInformation index, bool noLock) | Generate SQL for creating an INDEX from an IndexInformation definition. |
string CreateTable(ITableInfo table) | Generates SQL for creating a new table |
string CreateView(string schema, string name, string selectSql) | Generates SQL for creating or replacing a view whose body is selectSql. |
string DescribeSchemaTables(string schema, ref List<Parameter> parameters) | Generates SQL for describing all table objects within a schema |
string DescribeTable(ITableInfo table, out List<Parameter> parameters) | Generates SQL for describing a table object, generally used to obtain IColumnInfo data about a table |
string DescribeTable(string table, string schema, out List<Parameter> parameters) | Generates SQL for describing a table object, generally used to obtain IColumnInfo data about a table |
string DropConstraint(Constraint constraint) | Returns SQL for dropping a constraint from a table |
string DropIndex(IndexInformation index) | Generates SQL to drop the requested index |
string DropTables(IEnumerable<string> tables) | Returns SQL Statement formatted for deleting multiple tables at once |
ulong GetCacheKey() | FNV-1a Cache key based on generator type |
Collation GetCollation(string name) | Returns Collation details for Name |
string GetConstraints() | Returns SQL for retrieveing the CONSTRAINTS for a table object |
string GetDbColumnType(IColumnInfo info) | Resolves the database-specific column type for a given column. |
string GetIndexes() | Return SQL to get all defined index in the database |
string GetIndexes(string schema) | Return SQL to get all defined index in the database |
string GetIndexesByTable(ITableInfo table) | Return SQL to get indexes for a specific table |
ISqlStatement ReleaseDatabaseLock(string resource, DatabaseLockMode mode, DatabaseLockOwner owner) | Generates a command that releases one acquisition of a database-backed application lock. |
string RenameTable(string tableName, string newName) | Generate SQL for Renaming an existing table in the database |
string SetColumnComment(ITableInfo table, IColumnInfo column) | Generates SQL to set or replace the comment on a column. |
string SetIndexComment(IndexInformation index) | Generates SQL to set or replace the comment on an index. |
string SetTableComment(ITableInfo table) | Generates SQL to set or replace the comment on a table. |