Unit SqlitePassConst

DescriptionusesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

The unit SqlitePassConst defines all the constants used by the SqlitePass Database Objects Project.

—————————————————————————

This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

—————————————————————————

Messages localisation unit Author : Luc DAVID Email: luckylazarus@free.fr 2006-2010

Major changes are indicated in the \Documentation\changes.pdf file Last update : 10.03.2009

—————————————————————————

Overview

Constants

AfterIdentifierSeparator = [KwSpace, KwComma, kwLineReturn, kwBraceClose, KwSqlEnd];
BeforeIdentifierSeparator = [KwSpace, KwComma, kwLineBreak, kwBraceOpen];
fsModified = 1;
fsModifiedFlag = 1;
fsNotModified = 0;
fsNotNull = 0;
fsNull = 1;
fsNullFlag = 0;
IdentifierChar: Set of Char = ['0'..'9', 'a'..'z', 'A'..'Z', '_', '.', 'é', 'è', 'ê'];
KexiBlobs_CreateSQLStmt = 'CREATE TABLE kexi__blobs (o_id INTEGER PRIMARY KEY, o_data BLOB, o_name Text(200), o_caption Text(200), o_mime Text(200) NOT NULL, o_folder_id Integer UNSIGNED);';
KexiDb_CreateSQLStmt = 'CREATE TABLE kexi__db (db_property Text(32), db_value CLOB);';
KexiFieldConstraints = 'NoConstraints,AutoInc,Unique,PrimaryKey,ForeignKey,NotNull,NotEmpty,Indexed';
KexiFields_CreateSQLStmt = 'CREATE TABLE kexi__fields (t_id Integer UNSIGNED, f_type Byte UNSIGNED, f_name Text(200), f_length Integer, f_precision Integer, f_constraints Integer, f_options Integer, f_default Text(200), f_order Integer, f_caption Text(200), f_help CLOB);';
KexiObjectData_CreateSQLStmt = 'CREATE TABLE kexi__objectdata (o_id Integer UNSIGNED NOT NULL, o_data CLOB, o_sub_id Text(200));';
KexiObjects_CreateSQLStmt = 'CREATE TABLE kexi__objects (o_id INTEGER PRIMARY KEY, o_type Byte UNSIGNED, o_name Text(200), o_caption Text(200), o_desc CLOB);';
KexiParts_CreateSQLStmt = 'CREATE TABLE kexi__parts (p_id INTEGER PRIMARY KEY, p_name Text(200), p_mime Text(200), p_url Text(200));';
KexiSystemTables:array[0..7] of string = ('kexi__db', 'kexi__fields', 'kexi__final', 'kexi__objects', 'kexi__objectdata', 'kexi__parts', 'kexi__useractions', 'kexi__blobs');
kwAll = 'ALL';
KwAllFields = '*';
KwAnd = 'AND';
KwASAlias = 'AS';
kwBraceClose = ')';
kwBraceOpen = '(';
kwBracketClose = ']';
kwBracketOpen = '[';
kwComma = ',';
kwCreate = 'CREATE';
kwCreateTable = 'CREATE TABLE';
kwCreateTemporaryTable = 'CREATE TEMPORARY TABLE';
kwCreateTempTable = 'CREATE TEMP TABLE';
kwDelete = 'DELETE';
kwDistinct = 'DISTINCT';
kwDot = '.';
kwDoubleQuote = '"';
kwEqual = '=';
kwFrom = 'FROM';
kwGroupBy = 'GROUP BY';
kwHaving = 'HAVING';
kwInsert = 'INSERT';
kwLike = 'LIKE';
kwLimit = 'LIMIT';
kwLineBreak = Char($A);
kwLineEnd = KwLineReturn + KwLineBreak;
KwLineReturn = Char($D);
kwOrderBy = 'ORDER BY';
kwPragmaTableInfo = 'PRAGMA TABLE_INFO';
kwSelect = 'SELECT';
kwSingleQuote = '''';
KwSpace = ' ';
kwSQLEnd = ';' ;
kwUpdate = 'UPDATE';
kwWhere = 'WHERE';
QuoteChars = [KwSingleQuote, KwDoubleQuote, kwBracketOpen, kwBracketClose];
QuoteCharsArray: Array[0..3] of String = (KwSingleQuote, KwDoubleQuote, kwBracketOpen, kwBracketClose);
rsDeleted = 1;
rsDeletedFlag = 4;
rsEnabled = 0;
rsEnabledFlag = 0;
rsInserted = 1;
rsInsertedFlag = 3;
rsModified = 1;
rsModifiedFlag = 2;
rsNotDeleted = 0;
rsNotEnabled = 1;
rsNotInserted = 0;
rsNotModified = 0;
rsNotVisible = 1;
rsVisible = 0;
rsVisibleFlag = 1;
SelectStmtFieldDefs: array[0..4] of String = (kwSelect, kwAll, KwDistinct, kwComma, KwSQLEnd);
SelectStmtKeywords: array[0..7] of String = (kwSelect, kwFrom, kwWhere, kwGroupBy, kwHaving, kwOrderBy, kwLimit, kwSQLEnd);
SelectStmtTableDefs: array[0..3] of String = (kwFrom, kwAsAlias, kwComma, KwSQLEnd);
SqlitePassDatabaseVersion = '0.50';
SqlitePassDatasetVersion = '0.50';
SqlitePassDbSettingsTable = 'SQLitePass__DbSettings';
SqlitePassPackageVersion = '0.50';
SqlitePassSQLStmtDefsTable = 'SQLitePass__SQLStmts';
SqlitePassSQLTokenTypeAsString: Array[0..35] of String = ('ttKeyword', 'ttIdentifier', 'ttDatabaseIdentifier', 'ttTableIdentifier', 'ttFieldIdentifier', 'ttFunctionIdentifier', 'ttStar', 'ttNumber', 'ttDateTime', 'ttSingleQuote', 'ttDoubleQuote', 'ttHash', 'ttBraceOpen', 'ttBraceClose', 'ttSquareOpen', 'ttSquareClose', 'ttRoundOpen', 'ttRoundClose', 'ttWhitespace', 'ttComment', 'ttComma', 'ttColon', 'ttSemiColon', 'ttEqual', 'ttNotEqual', 'ttGreater', 'ttGreaterOrEqual', 'ttLesser', 'ttLesserOrEqual', 'ttPlus', 'ttMinus', 'ttPoint', 'ttSlash', 'ttSeparator', 'ttEOF', 'ttUnknown');
SqlitePassStorageVersion = '0.40';
StmtTypeKeywords: array[0..7] of String = (kwCreateTemporaryTable, kwCreateTempTable, kwCreateTable, kwCreate, kwSelect, KwInsert, kwUpdate, kwDelete);
vlLog = 1;
vlLogAndShow = 3;
vlShow = 2;
vlSilent = 0;

Description

Constants

AfterIdentifierSeparator = [KwSpace, KwComma, kwLineReturn, kwBraceClose, KwSqlEnd];
 
BeforeIdentifierSeparator = [KwSpace, KwComma, kwLineBreak, kwBraceOpen];
 
fsModified = 1;

Default : At loading time, AllocMem initialize memory to 0 = value is not null

fsModifiedFlag = 1;
 
fsNotModified = 0;
 
fsNotNull = 0;
 
fsNull = 1;

Default value when testing field status

fsNullFlag = 0;

Internal Field status flag position in byte (fsNullFlag,fsModifiedFlag,0,0,0,0,0,0)

IdentifierChar: Set of Char = ['0'..'9', 'a'..'z', 'A'..'Z', '_', '.', 'é', 'è', 'ê'];

kwPragmaTableInfo,

KexiBlobs_CreateSQLStmt = 'CREATE TABLE kexi__blobs (o_id INTEGER PRIMARY KEY, o_data BLOB, o_name Text(200), o_caption Text(200), o_mime Text(200) NOT NULL, o_folder_id Integer UNSIGNED);';
 
KexiDb_CreateSQLStmt = 'CREATE TABLE kexi__db (db_property Text(32), db_value CLOB);';

SQL Stqtements used to create system tables needed by Kexi (used by TSqlitePassDatabase.CreateDatabase)

KexiFieldConstraints = 'NoConstraints,AutoInc,Unique,PrimaryKey,ForeignKey,NotNull,NotEmpty,Indexed';

NoConstraints = 0, AutoInc = 1, ? Unique = 2, ? PrimaryKey = 4, ? ForeignKey = 8, -> FieldType NotNull = 16, ? NotEmpty = 32, ? //!< only legal for string-like and blob fields Indexed = 64 -> IsIndexField

KexiFields_CreateSQLStmt = 'CREATE TABLE kexi__fields (t_id Integer UNSIGNED, f_type Byte UNSIGNED, f_name Text(200), f_length Integer, f_precision Integer, f_constraints Integer, f_options Integer, f_default Text(200), f_order Integer, f_caption Text(200), f_help CLOB);';
 
KexiObjectData_CreateSQLStmt = 'CREATE TABLE kexi__objectdata (o_id Integer UNSIGNED NOT NULL, o_data CLOB, o_sub_id Text(200));';
 
KexiObjects_CreateSQLStmt = 'CREATE TABLE kexi__objects (o_id INTEGER PRIMARY KEY, o_type Byte UNSIGNED, o_name Text(200), o_caption Text(200), o_desc CLOB);';
 
KexiParts_CreateSQLStmt = 'CREATE TABLE kexi__parts (p_id INTEGER PRIMARY KEY, p_name Text(200), p_mime Text(200), p_url Text(200));';
 
KexiSystemTables:array[0..7] of string = ('kexi__db', 'kexi__fields', 'kexi__final', 'kexi__objects', 'kexi__objectdata', 'kexi__parts', 'kexi__useractions', 'kexi__blobs');

Kexi system tables

kwAll = 'ALL';
 
KwAllFields = '*';
 
KwAnd = 'AND';
 
KwASAlias = 'AS';
 
kwBraceClose = ')';
 
kwBraceOpen = '(';
 
kwBracketClose = ']';
 
kwBracketOpen = '[';

Quotes

kwComma = ',';
 
kwCreate = 'CREATE';

Keywords definition for [create] statement

kwCreateTable = 'CREATE TABLE';
 
kwCreateTemporaryTable = 'CREATE TEMPORARY TABLE';
 
kwCreateTempTable = 'CREATE TEMP TABLE';
 
kwDelete = 'DELETE';

Keywords definition for [delete] statement

kwDistinct = 'DISTINCT';
 
kwDot = '.';
 
kwDoubleQuote = '"';
 
kwEqual = '=';
 
kwFrom = 'FROM';
 
kwGroupBy = 'GROUP BY';
 
kwHaving = 'HAVING';
 
kwInsert = 'INSERT';

Keywords definition for [Insert] statement

kwLike = 'LIKE';
 
kwLimit = 'LIMIT';
 
kwLineBreak = Char($A);
 
kwLineEnd = KwLineReturn + KwLineBreak;
 
KwLineReturn = Char($D);
 
kwOrderBy = 'ORDER BY';
 
kwPragmaTableInfo = 'PRAGMA TABLE_INFO';
 
kwSelect = 'SELECT';

Keywords definition for [select] statement

kwSingleQuote = '''';
 
KwSpace = ' ';
 
kwSQLEnd = ';' ;

Global Keywords definition

kwUpdate = 'UPDATE';

Keywords definition for [update] statement

kwWhere = 'WHERE';
 
QuoteChars = [KwSingleQuote, KwDoubleQuote, kwBracketOpen, kwBracketClose];
 
QuoteCharsArray: Array[0..3] of String = (KwSingleQuote, KwDoubleQuote, kwBracketOpen, kwBracketClose);
 
rsDeleted = 1;

Default : At loading time, AllocMem initialize memory to 0 = value is not Modified

rsDeletedFlag = 4;
 
rsEnabled = 0;

Default value when testing record status

rsEnabledFlag = 0;

Internal record status flag position in byte (rsEnabled, rsModified, rsInserted, rsDeleted, rsVisible, 0,0,0)

rsInserted = 1;
 
rsInsertedFlag = 3;
 
rsModified = 1;

Default : At loading time, AllocMem initialize memory to 0 = value is not Modified

rsModifiedFlag = 2;
 
rsNotDeleted = 0;
 
rsNotEnabled = 1;

Default : At loading time, AllocMem initialize memory to 0 = value is Enabled

rsNotInserted = 0;
 
rsNotModified = 0;
 
rsNotVisible = 1;

Default : At loading time, AllocMem initialize memory to 0 = value is Visible

rsVisible = 0;

Default : At loading time, AllocMem initialize memory to 0 = value is not Deleted

rsVisibleFlag = 1;
 
SelectStmtFieldDefs: array[0..4] of String = (kwSelect, kwAll, KwDistinct, kwComma, KwSQLEnd);
 
SelectStmtKeywords: array[0..7] of String = (kwSelect, kwFrom, kwWhere, kwGroupBy, kwHaving, kwOrderBy, kwLimit, kwSQLEnd);
 
SelectStmtTableDefs: array[0..3] of String = (kwFrom, kwAsAlias, kwComma, KwSQLEnd);
 
SqlitePassDatabaseVersion = '0.50';
 
SqlitePassDatasetVersion = '0.50';
 
SqlitePassDbSettingsTable = 'SQLitePass__DbSettings';

System tables

SqlitePassPackageVersion = '0.50';

Components version

SqlitePassSQLStmtDefsTable = 'SQLitePass__SQLStmts';
 
SqlitePassSQLTokenTypeAsString: Array[0..35] of String = ('ttKeyword', 'ttIdentifier', 'ttDatabaseIdentifier', 'ttTableIdentifier', 'ttFieldIdentifier', 'ttFunctionIdentifier', 'ttStar', 'ttNumber', 'ttDateTime', 'ttSingleQuote', 'ttDoubleQuote', 'ttHash', 'ttBraceOpen', 'ttBraceClose', 'ttSquareOpen', 'ttSquareClose', 'ttRoundOpen', 'ttRoundClose', 'ttWhitespace', 'ttComment', 'ttComma', 'ttColon', 'ttSemiColon', 'ttEqual', 'ttNotEqual', 'ttGreater', 'ttGreaterOrEqual', 'ttLesser', 'ttLesserOrEqual', 'ttPlus', 'ttMinus', 'ttPoint', 'ttSlash', 'ttSeparator', 'ttEOF', 'ttUnknown');
 
SqlitePassStorageVersion = '0.40';

Storage version

StmtTypeKeywords: array[0..7] of String = (kwCreateTemporaryTable, kwCreateTempTable, kwCreateTable, kwCreate, kwSelect, KwInsert, kwUpdate, kwDelete);

Keywords definitions for statement type checking

vlLog = 1;
 
vlLogAndShow = 3;
 
vlShow = 2;
 
vlSilent = 0;

Verbose Level (For error handling)


Generated by PasDoc 0.11.0 on 2010-03-22 23:38:10