using System;
namespace NHibernate.Driver
{
///
/// SQL Dialect for SQL Anywhere 12 - for the NHibernate 3.2.0 distribution
/// Copyright (C) 2011 Glenn Paulley
/// Contact: http://iablog.sybase.com/paulley
///
/// This NHibernate dialect for SQL Anywhere 12 is a contribution to the NHibernate
/// open-source project. It is intended to be included in the NHibernate
/// distribution and is licensed under LGPL.
///
/// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
///
///
///
///
/// The SybaseSQLAnywhere12Driver provides a database driver for Sybase SQL Anywhere 12
/// using the versioned ADO.NET driver iAnywhere.Data.SQLAnywhere.v4.0.
///
public class SybaseSQLAnywhere12Driver : ReflectionBasedDriver
{
///
/// Initializes a new instance of the class.
/// Note that the SQL Anywhere 12 dialect supports both named and positional parameters.
/// Named parameters are denoted using a colon (:) similar to embedded SQL.
///
///
/// Thrown when the iAnywhere.Data.SQLAnywhere.v4.0 assembly is not and can not be loaded.
/// Note that if you wish to use the ADO.NET 3.5 support offered in SQL Anywhere 12, you
/// must change "v4.0" to "v3.5" and ensure that you have the iAnywhere.Data.SQLAnywhere.v3.5 assembly
/// available in the GAC or the V3.5 DLL must be somewhere in your path.
///
public SybaseSQLAnywhere12Driver()
: base("iAnywhere.Data.SQLAnywhere", "iAnywhere.Data.SQLAnywhere.v4.0", "iAnywhere.Data.SQLAnywhere.SAConnection", "iAnywhere.Data.SQLAnywhere.SACommand")
{
}
public override bool UseNamedPrefixInSql
{
get { return true; }
}
public override bool UseNamedPrefixInParameter
{
get { return true; }
}
public override string NamedPrefix
{
get { return ":"; }
}
}
}