Kitto.DbUtils
Routines
function CalcNewProgress(const IdProgress: string;Computes the next progressive code, incrementing IdProgress padded to CharSize digits.
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.
function GetSQLFieldValue(const ATableName, AFieldName, AKeyFieldName, AKeyFieldValue: string): string;Builds a SQL statement that reads AFieldName from ATableName for the given key value.
function GetTableName(const AField: TKField): string;Returns the database table name of the model that owns the given store field.
function GetPhysicalName(const AField: TKField): string;Returns the physical (database) column name for the given store field.
function ModelByField(const AField: TKField): TKModel;Returns the model that owns the given store field.
function ModelByRecord(const ARecord: TKRecord): TKModel;Returns the model that owns the given store record.
function ModelFieldByField(const AField: TKField): TKModelField;Returns the model field corresponding to the given store field.
function ModelFindField(const AField: TKField): boolean;Returns True if a model field can be resolved for the given store field.
function GetSQLDeleteStatement(const ATableName, AKeyFieldName, AFieldValue: string): string;Builds a SQL DELETE statement for ATableName matching the given key field/value.
procedure DeleteRecord(const ATableName, AKeyFieldName, AFieldValue: string);Executes a DELETE on ATableName for the row whose key field matches AFieldValue.
procedure UpdateParamValue(AParams: TParams;Sets the value of the named parameter in AParams, handling Null/Variant conversion.
procedure CheckPasswordStrength(const APassword: string);Validates password strength; raises an exception if the password is too weak.
