Class TSQLiteTable

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TSQLiteTable = class(TObject)

Description

Class for handling SQLite query result

Hierarchy

Overview

Methods

Public constructor Create(const DB: TSQLiteDatabase; const SQL: String; PrepareOnly: Boolean = false);
Public destructor Destroy; override;
Public function FieldAsInteger(I: cardinal): int64;
Public function FieldAsBlob(I: cardinal): TMemoryStream;
Public function FieldAsBlobPtr(I: cardinal; out iNumBytes: integer): Pointer;
Public function FieldAsBlobText(I: cardinal): AnsiString;
Public function FieldIsNull(I: cardinal): boolean;
Public function FieldAsString(I: cardinal): AnsiString;
Public function FieldAsDouble(I: cardinal): double;
Public function Next: boolean;
Public procedure ParamsClear;
Public procedure Reset;
Public procedure AddParamInt(const name: String; value: int64);
Public procedure AddParamFloat(const name: String; value: double);
Public procedure AddParamText(const name: String; const value: AnsiString);
Public procedure AddParamNull(const name: String);
Public procedure AddParamBlobPtr(const name: String; buffer: pointer; len: integer);
Public procedure AddParamBlobText(const name: String; const value: AnsiString);
Public procedure AddParamBlob(const name: String; const value: TStream; len: integer);

Properties

Public property Fields[I: cardinal]: AnsiString read GetFields;
Public property FieldByName[FieldName: String]: String read GetFieldByName;
Public property FieldIndex[FieldName: String]: integer read GetFieldIndex;
Public property Columns[I: integer]: String read GetColumns;
Public property EOF: boolean read FEOF;
Public property ColCount: cardinal read fColCount;
Public property Row: cardinal read fRow;

Description

Methods

Public constructor Create(const DB: TSQLiteDatabase; const SQL: String; PrepareOnly: Boolean = false);

Class constructor. Called internally by TSQLiteDatabase

Public destructor Destroy; override;

Class descructor. Call Free instead.

Public function FieldAsInteger(I: cardinal): int64;

Read field from current row as integer.

Public function FieldAsBlob(I: cardinal): TMemoryStream;

Read field from current row as blob to memory stream.

Public function FieldAsBlobPtr(I: cardinal; out iNumBytes: integer): Pointer;

Read field from current row as pointer to memory.

Public function FieldAsBlobText(I: cardinal): AnsiString;

Read field from current row as blob to AnsiString.

Public function FieldIsNull(I: cardinal): boolean;

Test if field from current row contains null value.

Public function FieldAsString(I: cardinal): AnsiString;

Read field from current row as string.

Public function FieldAsDouble(I: cardinal): double;

Read field from current row as floating-point.

Public function Next: boolean;

Go to next row.

Public procedure ParamsClear;

Reset all query params.

Public procedure Reset;

Reset current result set. After this you can set new query parameters values and call prepared query again by Next

Public procedure AddParamInt(const name: String; value: int64);

Add named query parameter of integer type.

Public procedure AddParamFloat(const name: String; value: double);

Add named query parameter of floating-point type.

Public procedure AddParamText(const name: String; const value: AnsiString);

Add named query parameter of string or binary type.

Public procedure AddParamNull(const name: String);

Add named query parameter with null value.

Public procedure AddParamBlobPtr(const name: String; buffer: pointer; len: integer);

Add named query parameter of BLOB type from memory buffer.

Public procedure AddParamBlobText(const name: String; const value: AnsiString);

Add named query parameter of BLOB type from binary string.

Public procedure AddParamBlob(const name: String; const value: TStream; len: integer);

Add named query parameter of BLOB type from stream.

Properties

Public property Fields[I: cardinal]: AnsiString read GetFields;

Return value of some field in current row.

Public property FieldByName[FieldName: String]: String read GetFieldByName;

Return value of named field in current row.

Public property FieldIndex[FieldName: String]: integer read GetFieldIndex;

Return index of some named field.

Public property Columns[I: integer]: String read GetColumns;

Return field type of some field.

Public property EOF: boolean read FEOF;

Indicate last row in result set.

Public property ColCount: cardinal read fColCount;

Return number of fields in row.

Public property Row: cardinal read fRow;

Number of current row.


Generated by PasDoc 0.9.0 on 2018-03-13 21:07:28