Skip to content
Documentation

ITimeSeriesDataSqlQueryBuilder<TParameter> Interface

Builds SQL queries and related parameters for SQL storage readers/writers.

public interface ITimeSeriesDataSqlQueryBuilder<TParameter>
where TParameter : HAKOM.Persistence.Sql.Net.Api.ISqlParameter

TParameter

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildDeleteAllQuery(string) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildDeleteAllQuery(string) Method”

Builds a query to delete all data of a time series. The time series of which the data will be deleted, is defined by sql parameters.

string BuildDeleteAllQuery(string tableName);

tableName System.String

The table name of the data table where the data will be deleted.

System.String
A full SQL query with placeholders for some relevant parameters.

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildDeleteQuotationAndHistoricDataQuery(string, string) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildDeleteQuotationAndHistoricDataQuery(string, string) Method”

Builds a query to delete all data of a quotation time series with PreserveHistoricData set to true..

string BuildDeleteQuotationAndHistoricDataQuery(string historicTable, string auditTable);

historicTable System.String

The name of the data table where the data will be deleted.

auditTable System.String

The table name of the audit logs table where the logs will be deleted.

System.String
A full SQL query with placeholders for some relevant parameters.

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildDeleteTimeRangeQuery(string, FunctionType) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildDeleteTimeRangeQuery(string, FunctionType) Method”

Builds a query to delete all data of a time series in a time range. The time frame, which will be deleted, is defined by sql parameters.

string BuildDeleteTimeRangeQuery(string tableName, HAKOM.TSM.Net.Api.TimeSeries.FunctionType function);

tableName System.String

The table name of the data table where the data will be deleted.

function FunctionType

The FunctionType of the time series, whose data will be read. Affects the where clause.

System.String
A full SQL query with placeholders for some relevant parameters.

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildDeleteTimeRangeWithQuotationQuery(string, bool, FunctionType) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildDeleteTimeRangeWithQuotationQuery(string, bool, FunctionType) Method”

Builds a query to delete all data of a time series in a time range. The time frame, which will be deleted, is defined by sql parameters.

string BuildDeleteTimeRangeWithQuotationQuery(string tableName, bool cyclic, HAKOM.TSM.Net.Api.TimeSeries.FunctionType function);

tableName System.String

The table name of the data table where the data will be deleted.

cyclic System.Boolean

The Cyclic property of the time series, whose data will be deleted. Affects the where clause.

function FunctionType

The FunctionType of the time series, whose data will be deleted. Affects the where clause.

System.String
A full SQL query with placeholders for some relevant parameters.

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildInsertAuditDataQuery(string) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildInsertAuditDataQuery(string) Method”

Builds a query to insert audit data for a time series. The data to be written, is defined by sql parameters.

string BuildInsertAuditDataQuery(string auditTable);

auditTable System.String

The table name of the data audit table.

System.String
A full SQL query with placeholders for some relevant parameters.

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildInsertAuditedQuotationEntryQuery(string) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildInsertAuditedQuotationEntryQuery(string) Method”

Builds a query to insert IAuditedQuotationEntry for a time series. The data to be written, is defined by sql parameters.

string BuildInsertAuditedQuotationEntryQuery(string auditTable);

auditTable System.String

The table name of the data audit table.

System.String
A full SQL query with placeholders for some relevant parameters.

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildReadAuditDataQuery() Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildReadAuditDataQuery() Method”

Builds a query to read audit data for a time series. The time frame, which will be read, is defined by sql parameters.

string BuildReadAuditDataQuery();

System.String
An full SQL query with placeholders for some relevant parameters.

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildReadAuditDataQuery(string, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, Nullable<Period>) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildReadAuditDataQuery(string, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, Nullable<Period>) Method”

Builds a query to read audit data for a time series. The time frame, which will be read, is defined by sql parameters.

string BuildReadAuditDataQuery(string auditTable, System.Nullable<System.DateTimeOffset> modifiedSince=null, System.Nullable<System.DateTimeOffset> modifiedUntil=null, System.Nullable<HAKOM.TSM.Net.Api.Time.Periods.Period> dataPeriod=null);

auditTable System.String

The table name of the data audit table.

modifiedSince System.Nullable<System.DateTimeOffset>

If not null it adds an where clause to filter by audittime greater or equal to this date.

modifiedUntil System.Nullable<System.DateTimeOffset>

If not null it adds an where clause to filter by audittime lower or equal to this date.

dataPeriod System.Nullable<Period>

If not null it adds an where clause to filter by the from and to time.

System.String
An full SQL query with placeholders for some relevant parameters.

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildReadDataQuery(CompressionMode, string, bool, FunctionType, bool) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildReadDataQuery(CompressionMode, string, bool, FunctionType, bool) Method”

Builds a query to read data from the given tableName. The other parameters affect parts of the select and where clauses.

string BuildReadDataQuery(HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode compressionMode, string tableName, bool cyclic, HAKOM.TSM.Net.Api.TimeSeries.FunctionType function, bool preserveHistoricData=false);

compressionMode CompressionMode

The CompressionMode of the time series, whose data will be read. If equal to NoCompression, a “flag” column is added to the select clause.

tableName System.String

The name of the table used in the from clause.

cyclic System.Boolean

The Cyclic property of the time series, whose data will be read. Affects the where clause.

function FunctionType

The FunctionType of the time series, whose data will be read. Affects the where clause.

preserveHistoricData System.Boolean

The PreserveHistoricData property of the time series, whose data will be read. Affects the where clause.

System.String
An SQL query with placeholders for some relevant parameters.

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildReadHistoricQuotationDataQuery(string, string, bool, FunctionType) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildReadHistoricQuotationDataQuery(string, string, bool, FunctionType) Method”

Builds a query to read data from the table given with the name given in historicTableName.

string BuildReadHistoricQuotationDataQuery(string historicTableName, string quotationEntryTableName, bool cyclic, HAKOM.TSM.Net.Api.TimeSeries.FunctionType function);

historicTableName System.String

The name of the table used in the from clause, where the quotation data is saved.

quotationEntryTableName System.String

The name of the table where the audited quotation entries are saved.

cyclic System.Boolean

The Cyclic property of the time series, whose data will be read. Affects the where clause.

function FunctionType

The FunctionType of the time series, whose data will be read. Affects the where clause.

System.String
An SQL query with placeholders for some relevant parameters.

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildReadQuotationDataExactQuery(string, bool, FunctionType) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildReadQuotationDataExactQuery(string, bool, FunctionType) Method”

Builds a query to read data from the table given with the name given in tableName.

string BuildReadQuotationDataExactQuery(string tableName, bool cyclic, HAKOM.TSM.Net.Api.TimeSeries.FunctionType function);

tableName System.String

The name of the table used in the from clause, where the quotation data is saved.

cyclic System.Boolean

The Cyclic property of the time series, whose data will be read. Affects the where clause.

function FunctionType

The FunctionType of the time series, whose data will be read. Affects the where clause.

System.String
An SQL query with placeholders for some relevant parameters.

ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildWhereClauseForFunctionTypeDependentDateRange(string, bool, FunctionType, bool, bool) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.BuildWhereClauseForFunctionTypeDependentDateRange(string, bool, FunctionType, bool, bool) Method”

Builds sub conditions of a query for filtering date ranges in a data reading query, depending on properties of the time series.

string BuildWhereClauseForFunctionTypeDependentDateRange(string tableName, bool cyclic, HAKOM.TSM.Net.Api.TimeSeries.FunctionType function, bool preserveHistoricData=false, bool quotation=false);

tableName System.String

The name of the table used in the from clause, where the data is saved.

cyclic System.Boolean

The Cyclic property of the time series, whose data will be read.

function FunctionType

The FunctionType of the time series, whose data will be read.

preserveHistoricData System.Boolean

The PreserveHistoricData property of the time series, whose data will be read.

quotation System.Boolean

The Quotation property of the time series, whose data will be read.

System.String
Additional filtering SQL query for data reading operations (starting with AND not WHERE).

ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateFromParameter(TimeBase, DateTimeOffset) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateFromParameter(TimeBase, DateTimeOffset) Method”

Creates an SQL parameter for the queries in this type.

TParameter CreateFromParameter(HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase timeBase, System.DateTimeOffset from);

timeBase TimeBase

The TimeBase which will be used to calculate the exact value of the parameter.

from System.DateTimeOffset

The System.DateTimeOffset on which the parameter is based.

TParameter
An SQL parameter corresponding to the “fromTime” placeholder of the queries in this type.

ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateHistoricDateTimeParameter(TimeBase, DateTimeOffset) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateHistoricDateTimeParameter(TimeBase, DateTimeOffset) Method”

Creates an SQL parameter for the queries in this type.

TParameter CreateHistoricDateTimeParameter(HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase timeBase, System.DateTimeOffset historicDateTime);

timeBase TimeBase

The TimeBase which will be used to calculate the exact value of the parameter.

historicDateTime System.DateTimeOffset

The System.DateTimeOffset on which the parameter is based.

TParameter
An SQL parameter corresponding to the “historicDateTime” placeholder of the queries in this type.

ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateLimitParameter(int) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateLimitParameter(int) Method”

Creates an SQL parameter for queries with a limit.

TParameter CreateLimitParameter(int limit);

limit System.Int32

The maximum amount of return values for a query.

TParameter
An SQL parameter corresponding to the “limit” placeholder of the queries.

ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateModifiedSinceParameter(TimeBase, DateTimeOffset) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateModifiedSinceParameter(TimeBase, DateTimeOffset) Method”

Creates an SQL parameter for queries with modifiedSince parameters (System.DateTimeOffset).

TParameter CreateModifiedSinceParameter(HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase timeBase, System.DateTimeOffset modifiedSince);

timeBase TimeBase

The TimeBase which will be used to calculate the exact value of the parameter.

modifiedSince System.DateTimeOffset

The System.DateTimeOffset on which the parameter is based.

TParameter
An SQL parameter corresponding to the “modifiedSince” placeholder of the queries in this type.

ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateModifiedUntilParameter(TimeBase, DateTimeOffset) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateModifiedUntilParameter(TimeBase, DateTimeOffset) Method”

Creates an SQL parameter for queries with modifiedUntil parameters (System.DateTimeOffset).

TParameter CreateModifiedUntilParameter(HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase timeBase, System.DateTimeOffset modifiedUntil);

timeBase TimeBase

The TimeBase which will be used to calculate the exact value of the parameter.

modifiedUntil System.DateTimeOffset

The System.DateTimeOffset on which the parameter is based.

TParameter
An SQL parameter corresponding to the “modifiedUntil” placeholder of the queries in this type.

ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateQuotationDateTimeFromParameter(TimeBase, DateTimeOffset) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateQuotationDateTimeFromParameter(TimeBase, DateTimeOffset) Method”

Creates an SQL parameter for the queries in this type.

TParameter CreateQuotationDateTimeFromParameter(HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase timeBase, System.DateTimeOffset quotationDateTimeFrom);

timeBase TimeBase

The TimeBase which will be used to calculate the exact value of the parameter.

quotationDateTimeFrom System.DateTimeOffset

The System.DateTimeOffset on which the parameter is based.

TParameter
An SQL parameter corresponding to the “quotationDateTimeFrom” placeholder of the queries in this type.

ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateQuotationDateTimeParameter(TimeBase, DateTimeOffset) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateQuotationDateTimeParameter(TimeBase, DateTimeOffset) Method”

Creates an SQL parameter for the queries in this type.

TParameter CreateQuotationDateTimeParameter(HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase timeBase, System.DateTimeOffset quotationDateTime);

timeBase TimeBase

The TimeBase which will be used to calculate the exact value of the parameter.

quotationDateTime System.DateTimeOffset

The System.DateTimeOffset on which the parameter is based.

TParameter
An SQL parameter corresponding to the “quotationDateTime” placeholder of the queries in this type.

ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateQuotationDateTimeToParameter(TimeBase, DateTimeOffset) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateQuotationDateTimeToParameter(TimeBase, DateTimeOffset) Method”

Creates an SQL parameter for the queries in this type.

TParameter CreateQuotationDateTimeToParameter(HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase timeBase, System.DateTimeOffset quotationDateTimeTo);

timeBase TimeBase

The TimeBase which will be used to calculate the exact value of the parameter.

quotationDateTimeTo System.DateTimeOffset

The System.DateTimeOffset on which the parameter is based.

TParameter
An SQL parameter corresponding to the “quotationDateTimeTo” placeholder of the queries in this type.

ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateTimeSeriesIdParameter(int) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateTimeSeriesIdParameter(int) Method”

Creates an SQL parameter for the queries in this type.

TParameter CreateTimeSeriesIdParameter(int identifier);

identifier System.Int32

The identifier of the time series the data is stored for.

TParameter
An SQL parameter corresponding to the “id” placeholder of the queries in this type.

ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateToParameter(TimeBase, DateTimeOffset) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateToParameter(TimeBase, DateTimeOffset) Method”

Creates an SQL parameter for the queries in this type.

TParameter CreateToParameter(HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase timeBase, System.DateTimeOffset to);

timeBase TimeBase

The TimeBase which will be used to calculate the exact value of the parameter.

to System.DateTimeOffset

The System.DateTimeOffset on which the parameter is based.

TParameter
An SQL parameter corresponding to the “toTime” placeholder of the queries in this type.

ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateUserIdParameter(int) Method

Section titled “ITimeSeriesDataSqlQueryBuilder<TParameter>.CreateUserIdParameter(int) Method”

Creates an SQL parameter for the queries in this type.

TParameter CreateUserIdParameter(int userId);

userId System.Int32

The user id on which the parameter is based.

TParameter
An SQL parameter corresponding to the “userId” placeholder of the queries in this type.

© 2026 Volue.Version v0.6.38017 November 2026