{ $Id: PDOClasses.pas 32 2007-01-22 01:35:20Z jmarino $

############################################################################################

	Pascal Data Objects Library
	Copyright © 2006 John Marino, http://www.synsport.com
	Project site: http://pdo.sourceforge.net

############################################################################################

	This library 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 library 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 library; if not, write to the Free Software
	Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

############################################################################################}

unit PDOClasses;

interface

{$I directives.inc}

uses
  SysUtils, Classes;

type
    PDO_errorInfoRecord = record
        SQLState:    AnsiString;
        Error_code:  Integer;
        Error_msg:   AnsiString;
    end;

    TSQLDialect = (SQL_MYSQL, SQL_POSTGRESQL, SQL_SQLITE, SQL_MSSQL,
                 SQL_ORACLE, SQL_DB2, SQL_FIREBIRD, SQL_SYBASE, SQL_ANSI92,
                 SQL_ODBC);

    PDO_selectRecord = record
        sqlColumns, sqlTables, sqlConditions, sqlOrderBy: AnsiString;
        sqlLimit, sqlOffset: Int64;
    end;
    TDeletionMethod = (DELETE_PARTIAL, DELETE_ALL, TRUNCATE);

    TPDO_Attributes = (
        COLUMN_CASE, ERRMODE, ORACLE_NULLS, AUTOCOMMIT, PREFETCH,
        CONNECTION_STATUS, DRIVER_NAME, CLIENT_INFO, CLIENT_VERSION,
        SERVER_INFO, SERVER_VERSION, MAX_BLOB_SIZE, COMPRESSION, MULTIQUERY);

    TPDO_Characteristics = (
        CASE_LOWER, CASE_NATURAL, CASE_UPPER,
        ERRMODE_SILENT, ERRMODE_WARNING, ERRMODE_EXCEPTION,
        NULL_NATURAL, NULL_EMPTY_STRING, NULL_TO_STRING,
        AUTOCOMMIT_ON, AUTOCOMMIT_OFF,
        PREFETCH_ON, PREFETCH_OFF, XUNIMPLEMENTED,
        CONNECTED, UNCONNECTED, TEXTINFO,
        COMPRESSION_ON, COMPRESSION_OFF,
        MULTIQUERY_ON, MULTIQUERY_OFF
    );

const
  ERRORLEVEL_SILENT = 0;
  ERRORLEVEL_WARNING = 1;
  ERRORLEVEL_RAISE_EXCEPTION = 2;
  CASEMODE_LOWER = 0;
  CASEMODE_NATURAL = 1;
  CASEMODE_UPPER = 2;
  ORACLENULL_NATURAL = 0;
  ORACLENULL_EMPTY_STRING = 1;
  ORACLENULL_TO_STRING = 2;
  QUERY_PREFETCH_OFF = False;
  QUERY_FREFETCH_ON = True;
  CONNECTION_OFF = True;
  CONNECTION_ON = False;
  OPT_COMPRESS_ON = True;
  OPT_COMPRESS_OFF = False;
  OPT_MULTIQUERY_ON = true;
  OPT_MULTIQUERY_OFF = false;

implementation


end.

