Hide

YetaWF.DataProvider.PostgreSQL Package Documentation

Display
Print

YetaWF.DataProvider.PostgreSQL.SQLSimpleObjectBase<KEYTYPE,KEYTYPE2,OBJTYPE> Class

This base class implements access to objects (records), with a primary and secondary key (composite) and without identity column. This base class is not intended for use by application data providers. These use one of the more specialized derived classes instead.

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

Inheritance

Syntax

public class SQLSimpleObjectBase<KEYTYPE,KEYTYPE2,OBJTYPE> : YetaWF.DataProvider.PostgreSQL.SQLBase,
    YetaWF.Core.DataProvider.IDataProvider<KEYTYPE,OBJTYPE>,
    YetaWF.DataProvider.PostgreSQL.IPostgreSQLTableInfo;

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.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseConnThe underlying Nqgsql.NpgsqlConnection object used to connect to the database.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseConnectionStringDefines 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.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseSchemaDefines 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.
PublicStaticInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseExternalNameDefines the name of the PostgreSQL low-level data provider. This name is used in AppSettings.json ("IOMode": "PostgreSQL").
PublicStaticInherited from YetaWF.DataProvider.PostgreSQL.SQLBasePostgreSQLConnectStringDefines the key used in appsettings.json to define a PostgreSQL connection string. ("PostgreSQLConnect": "Host=..host..;Port=..port..;Database=..database..;User ID=..userid..;Password=..password..").
PublicStaticInherited from YetaWF.DataProvider.PostgreSQL.SQLBasePostgreSQLSchemaStringDefines the key used in appsettings.json to define a PostgreSQL schema.

Methods

PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseAbortTransactionAborts a transaction, abandoning all updates.
PublicAddAsyncAdds a new record to the database table.
PublicAddSiteDataAsyncAdds data for a new site.
PublicStaticInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseColumnFromPropertyWithLanguageReturns a column name based on language id.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseCommitTransactionAsyncCommits a transaction, saving all updates.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseDirect_QueryAsyncExecutes the provided SQL statement(s).
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseDirect_QueryListAsyncExecutes the provided SQL statement(s) and returns a collection of objects (one for each row retrieved) of type TYPE.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseDirect_QueryPagedListAsyncExecutes the provided SQL statement(s) and returns a paged collection of objects (one for each row retrieved) of type TYPE.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseDirect_ScalarIntAsyncExecutes the provided PostgreSQL statement(s) and returns a scalar integer.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseDirect_StoredProcAsyncExecutes the provided SQL stored procedure returns a collection of objects (one for each row retrieved) of type TYPE.
PublicInherited from YetaWF.DataProvider.SQLGeneric.SQLGenericBaseDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseEnsureOpenAsyncCalled 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.
PublicExportChunkAsyncExports data from the data provider.
ProtectedInherited from System.ObjectFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
PublicGetAsyncRetrieves one record from the database table that satisfies the specified keys.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseGetConnectionStringReturns the PostgreSQL connection string used by the data provider.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseGetDatabaseNameReturns 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.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseGetIPostgreSQLTableInfoAsyncReturns 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.
PublicGetOneRecordAsyncRetrieves one record using filtering criteria.
ProtectedGetPropertyDataRetrieves the property information for the model used.
PublicGetRecordsAsyncRetrieves a collection of records using filtering criteria with sorting, with support for paging.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseGetSchemaReturns the database owner used by the data provider.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseGetTableNameReturns 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.
PublicImportChunkAsyncImports data into the data provider.
PublicInstallModelAsyncInstalls all data models (files, tables, etc.) for the data provider.
PublicIsInstalledAsyncReturns whether the data provider is installed and available.
PublicLocalizeModelAsyncCalled to translate the data managed by the data provider to another language.
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.
PublicRemoveAsyncRemoves an existing record with the specified keys.
PublicRemoveRecordsAsyncRemoves records using filtering criteria.
PublicRemoveSiteDataAsyncRemoves data when a site is deleted.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseReplaceWithLanguageReplaces search text in a SQL string fragment with the language used by the data provider.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseReplaceWithTableNameReplaces search text in a SQL string fragment with the table name used by the data provider.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseStartTransactionStarts a transaction that can be committed, saving all updates, or aborted to abandon all updates.
PublicInherited from YetaWF.DataProvider.PostgreSQL.SQLBaseSupportTransactionsUsed 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.
PublicUninstallModelAsyncUninstalls all data models (files, tables, etc.) for the data provider.
PublicUpdateAsyncUpdates an existing record with the specified existing primary keys in the database table. The primary keys can be changed to new values.

See Also YetaWF.DataProvider.PostgreSQLYetaWF.Core