Skip to content

Kitto.DbUtils

Routines

pascal
function CalcNewProgress(const IdProgress: string;

Computes the next progressive code, incrementing IdProgress padded to CharSize digits.

pascal
function GetSQLCountValue(const ATableName, AFieldName, AFieldValue: string;

Builds a SQL statement that counts rows in ATableName where AFieldName equals AFieldValue, optionally excluding the row whose key equals AIdToExclude. Used for uniqueness checks.

pascal
function GetSQLFieldValue(const ATableName, AFieldName, AKeyFieldName, AKeyFieldValue: string): string;

Builds a SQL statement that reads AFieldName from ATableName for the given key value.

pascal
function GetTableName(const AField: TKField): string;

Returns the database table name of the model that owns the given store field.

pascal
function GetPhysicalName(const AField: TKField): string;

Returns the physical (database) column name for the given store field.

pascal
function ModelByField(const AField: TKField): TKModel;

Returns the model that owns the given store field.

pascal
function ModelByRecord(const ARecord: TKRecord): TKModel;

Returns the model that owns the given store record.

pascal
function ModelFieldByField(const AField: TKField): TKModelField;

Returns the model field corresponding to the given store field.

pascal
function ModelFindField(const AField: TKField): boolean;

Returns True if a model field can be resolved for the given store field.

pascal
function GetSQLDeleteStatement(const ATableName, AKeyFieldName, AFieldValue: string): string;

Builds a SQL DELETE statement for ATableName matching the given key field/value.

pascal
procedure DeleteRecord(const ATableName, AKeyFieldName, AFieldValue: string);

Executes a DELETE on ATableName for the row whose key field matches AFieldValue.

pascal
procedure UpdateParamValue(AParams: TParams;

Sets the value of the named parameter in AParams, handling Null/Variant conversion.

pascal
procedure CheckPasswordStrength(const APassword: string);

Validates password strength; raises an exception if the password is too weak.

Released under Apache License, Version 2.0.