Hide

YetaWF.DataProvider.PostgreSQL Package Documentation

Display
Print

YetaWF.DataProvider.PostgreSQL.SQLBase Class

This abstract class is the base class for all PostgreSQL low-level data providers.

Namespace: YetaWF.DataProvider.PostgreSQL
Assembly: YetaWF.DataProvider.PostgreSQL

Inheritance

Syntax

public abstract class SQLBase : YetaWF.DataProvider.SQLGeneric.SQLGenericBase,
    YetaWF.Core.DataProvider.IDataProviderTransactions;

Constructors

This class cannot be instantiated.

Properties

PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseCacheableDefines whether the data is cacheable. This corresponds to the Cacheable parameter of the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method.
PublicConnThe underlying Nqgsql.NpgsqlConnection object used to connect to the database.
PublicConnectionStringDefines the PostgreSQL connection string used by this data provider.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseDatabaseThe database used by this data provider. This information is extracted from the SQL connection string.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseDatasetThe dataset provided to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider was created.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseHasKey2Defines whether the model defines a secondary key.
PublicStaticInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseIdentityColumnDefines the column name of the identity column used in tables. Not all tables use an identity column.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseIdentityNameThe column name of the identity column.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseIdentitySeedThe initial value of the identity seed. The default value is defined by YetaWF.Core.DataProvider.DataProviderImpl.IDENTITY_SEED, but this can be overridden by passing an optional IdentitySeed parameter to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider is created.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseKey1NameThe column name of the primary key.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseKey2NameThe column name of the secondary key.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseLanguagesDefines the languages supported by the data provider. If NoLanguages is true, no language data is available. Otherwise, the languages supported are identical to collection of active languages defined by YetaWF.Core.Models.MultiString.Languages.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseLoggingDefines whether logging is wanted for the data provider. The default value is false, but this can be overridden by passing an optional Logging parameter to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider is created.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseNoLanguagesDefines whether language support (for YetaWF.Core.Models.MultiString) is wanted for the data provider. The default is true. This can be overridden by passing an optional NoLanguages parameter to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider is created.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseOptionsA dictionary of options and optional parameters as provided to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider was created.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBasePackageThe package implementing the data provider.
PublicSchemaDefines the database schema used by this data provider.
PublicStaticInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseSiteColumnDefines the column name used to associate a site with a data record. The __Site column contains the site ID, or 0 if there is no associated site. Not all tables use the __Site column.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseSiteIdentityThe site identity provided to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider was created. This may be 0 if no specific site is associated with the data provider.
PublicStaticInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseSubTableKeyColumnDefines the column name in subtables to connect a subtable and its records to the main table. The __Key column in a subtable contains the identity column used in the main table, used to join record data across tables.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseWebConfigAreaThe section in AppSettings.json, where SQL connection string, database owner, etc. are located. WebConfigArea is normally not specified and all connection information is derived from the AppSettings.json section that corresponds to the table name used by the data provider. This can be overridden by passing an optional WebConfigArea parameter to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider is created.
ProtectedInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseCalculatedPropertyCallbackAsyncAn optional callback which is called whenever an object is retrieved to update some properties.
ProtectedInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseIdentityNameOrDefaultReturns the identity column name or the default identity column name for the current object type.

Fields

PublicStaticInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseDefaultStringDefines the default key used in appsettings.json.
PublicStaticExternalNameDefines the name of the PostgreSQL low-level data provider. This name is used in AppSettings.json ("IOMode": "PostgreSQL").
PublicStaticPostgreSQLConnectStringDefines the key used in appsettings.json to define a PostgreSQL connection string. ("PostgreSQLConnect": "Host=..host..;Port=..port..;Database=..database..;User ID=..userid..;Password=..password..").
PublicStaticPostgreSQLSchemaStringDefines the key used in appsettings.json to define a PostgreSQL schema.

Methods

PublicAbortTransactionAborts a transaction, abandoning all updates.
PublicStaticInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseColumnFromPropertyWithLanguageReturns a column name based on language id.
PublicCommitTransactionAsyncCommits a transaction, saving all updates.
PublicDirect_QueryAsyncExecutes the provided SQL statement(s).
PublicDirect_QueryListAsyncExecutes the provided SQL statement(s) and returns a collection of objects (one for each row retrieved) of type TYPE.
PublicDirect_QueryPagedListAsyncExecutes the provided SQL statement(s) and returns a paged collection of objects (one for each row retrieved) of type TYPE.
PublicDirect_ScalarIntAsyncExecutes the provided PostgreSQL statement(s) and returns a scalar integer.
PublicDirect_StoredProcAsyncExecutes the provided SQL stored procedure returns a collection of objects (one for each row retrieved) of type TYPE.
PublicDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
PublicEnsureOpenAsyncCalled to make sure that the database connection has been opened. Any public API must call this as a data provider no longer opens the connection immediately.
PublicInherited from System.ObjectEqualsDetermines whether the specified object is equal to the current object.
ProtectedInherited from System.ObjectFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
PublicGetConnectionStringReturns the PostgreSQL connection string used by the data provider.
PublicGetDatabaseNameReturns the database name used by the data provider.
PublicInherited from System.ObjectGetHashCodeServes as the default hash function.
ProtectedInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseGetIdentityNameReturns the identity column name.
PublicGetIPostgreSQLTableInfoAsyncReturns an IPostgreSQLTableInfo interface for the data provider.
ProtectedInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseGetKey1NameReturns the primary key's column name.
ProtectedInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseGetKey2NameReturns the secondary key's column name.
PublicStaticInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseGetLanguageSuffixReturns the suffix appended to language dependent columns using the active language.
ProtectedInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseGetPropertyDataRetrieves the property information for the model used.
PublicGetSchemaReturns the database owner used by the data provider.
PublicGetTableNameReturns the table name used by the data provider.
PublicInherited from System.ObjectGetTypeGets the Type of the current instance.
ProtectedInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseHasIdentityReturns whether the specified identity name string identityName is a valid identity name.
ProtectedInherited from System.ObjectMemberwiseCloneCreates a shallow copy of the current Object.
ProtectedInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseNormalizeFilterNormalizes filters and updates column names for constructed names (as used in MultiString).
ProtectedInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseNormalizeSortNormalizes sort filters.
PublicStaticInherited from System.ObjectReferenceEqualsDetermines whether the specified Object instances are the same instance.
PublicReplaceWithLanguageReplaces search text in a SQL string fragment with the language used by the data provider.
PublicReplaceWithTableNameReplaces search text in a SQL string fragment with the table name used by the data provider.
PublicStartTransactionStarts a transaction that can be committed, saving all updates, or aborted to abandon all updates.
PublicSupportTransactionsUsed when creating a dataprovider whithin StartTransAction().
PublicInherited from System.ObjectToStringReturns a string that represents the current object.
PublicStaticInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseTryGetDataTypeTests whether a given type is a simple type that can be stored in one column.

See Also YetaWF.DataProvider.PostgreSQLYetaWF.Core