Class TRALCrudBase
Unit
Declaration
type TRALCrudBase = class(TObject)
Description
TRALCrudBase
Hierarchy
- TObject
- TRALCrudBase
Overview
Fields
![]() |
FParamNames: TStrings; |
![]() |
FParamValues: TStrings; |
![]() |
FQueryParamNames: TStrings; |
![]() |
FQueryParamValues: TStrings; |
![]() |
FRequest: TRALRequest; |
![]() |
FTable: StringRAL; |
![]() |
FPKName: StringRAL; |
![]() |
FPKValue: StringRAL; |
Methods
![]() |
constructor Create(ARequest: TRALRequest); overload; |
![]() |
constructor Create; overload; |
![]() |
destructor Destroy; override; |
![]() |
function CustomQuery(AQuery: StringRAL): TDataSet; virtual; abstract; |
![]() |
function Delete: variant; virtual; |
![]() |
function Insert: variant; virtual; |
![]() |
function ParamNames(Args: array of StringRAL): TRALCrudBase; |
![]() |
function ParamsFromKind(AKind: TRALParamKind): TRALCrudBase; |
![]() |
function ParamValues(Args: array of const): TRALCrudBase; |
![]() |
function PrimaryKey(pkName: StringRAL; pkValue: variant): TRALCrudBase; |
![]() |
function QueryParams(names, values: array of const): TRALCrudBase; virtual; abstract; |
![]() |
function Read: TDataSet; virtual; |
![]() |
function SetRequest(AValue: TRALRequest): TRALCrudBase; |
![]() |
function Table(ATable: StringRAL): TRALCrudBase; |
![]() |
function Update: variant; virtual; |
![]() |
procedure FromHTTPMethod; |
Description
Fields
![]() |
FParamNames: TStrings; |
![]() |
FParamValues: TStrings; |
![]() |
FQueryParamNames: TStrings; |
![]() |
FQueryParamValues: TStrings; |
![]() |
FRequest: TRALRequest; |
![]() |
FTable: StringRAL; |
![]() |
FPKName: StringRAL; |
![]() |
FPKValue: StringRAL; |
Methods
![]() |
constructor Create(ARequest: TRALRequest); overload; |
![]() |
constructor Create; overload; |
![]() |
destructor Destroy; override; |
![]() |
function CustomQuery(AQuery: StringRAL): TDataSet; virtual; abstract; |
|
Runs a custom query | |
![]() |
function Delete: variant; virtual; |
|
"D" of CRUD acronym, removes values from the database based on previously configured params | |
![]() |
function Insert: variant; virtual; |
|
"C" of CRUD acronym, inserts data into the database based on previously configured params | |
![]() |
function ParamNames(Args: array of StringRAL): TRALCrudBase; |
|
sets the names of the parameters which will be used in the CRUD functions | |
![]() |
function ParamsFromKind(AKind: TRALParamKind): TRALCrudBase; |
|
defines both ParamNames and ParamValues based on the ParamKind in the ARequest attribute | |
![]() |
function ParamValues(Args: array of const): TRALCrudBase; |
|
sets the values of the parameters which will be used in the CRUD functions respective to paramNames order | |
![]() |
function PrimaryKey(pkName: StringRAL; pkValue: variant): TRALCrudBase; |
|
defines which param is the primary key | |
![]() |
function QueryParams(names, values: array of const): TRALCrudBase; virtual; abstract; |
![]() |
function Read: TDataSet; virtual; |
|
"R" of CRUD acronym, gets values from the database based on previously configured params | |
![]() |
function SetRequest(AValue: TRALRequest): TRALCrudBase; |
|
defines RALRequest into CRUD Object | |
![]() |
function Table(ATable: StringRAL): TRALCrudBase; |
|
sets the database | |
![]() |
function Update: variant; virtual; |
|
"U" of CRUD acronym, updates values in the database based on previously configured params | |
![]() |
procedure FromHTTPMethod; |
|
Runs the CRUD based on HTTP Verb from the RALRequest following the rules: GET = read; POST = insert; PUT/PATCH = update; DELETE = delete; HEAD, TRACE, OPTIONS = nothing | |
GitHub Repository
Generated by PasDoc 0.16.0.

