public class SQLServerAdapter extends SybaseAdapter
Sample connection settings to use with MS SQL Server are shown below:
sqlserver.jdbc.username = test
sqlserver.jdbc.password = secret
sqlserver.jdbc.url = jdbc:sqlserver://192.168.0.65;databaseName=cayenne;SelectMethod=cursor
sqlserver.jdbc.driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
Note on case-sensitive LIKE: if your application requires case-sensitive LIKE support, ask your DBA to configure the database to use a case-senstitive collation (one with "CS" in symbolic collation name instead of "CI", e.g. "SQL_Latin1_general_CP1_CS_AS").
jTDS is an open source driver that can be downloaded from http://jtds.sourceforge.net . It supports both SQLServer and Sybase. Sample SQLServer settings are the following:
sqlserver.jdbc.username = test
sqlserver.jdbc.password = secret
sqlserver.jdbc.url = jdbc:jtds:sqlserver://192.168.0.65/cayenne
sqlserver.jdbc.driver = net.sourceforge.jtds.jdbc.Driver
| Modifier and Type | Field and Description |
|---|---|
static String |
TRIM_FUNCTION |
batchQueryBuilderFactory, caseInsensitiveCollations, CI_PROPERTY, ejbqlTranslatorFactory, extendedTypes, identifiersEndQuote, identifiersStartQuote, logger, resourceLocator, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler| Constructor and Description |
|---|
SQLServerAdapter(RuntimeProperties runtimeProperties,
List<ExtendedType> defaultExtendedTypes,
List<ExtendedType> userExtendedTypes,
List<ExtendedTypeFactory> extendedTypeFactories) |
| Modifier and Type | Method and Description |
|---|---|
void |
createTableAppendColumn(StringBuffer sqlBuffer,
DbAttribute column)
Overrides super implementation to correctly set up identity columns.
|
SQLAction |
getAction(Query query,
DataNode node)
Uses SQLServerActionBuilder to create the right action.
|
QualifierTranslator |
getQualifierTranslator(QueryAssembler queryAssembler)
Returns a trimming translator.
|
MergerFactory |
mergerFactory() |
bindParameter, configureExtendedTypes, createEJBQLTranslatorFactory, createPkGenerator, getBatchTerminator, initIdentifiersQuotesbuildAttribute, createFkConstraint, createTable, createTableAppendPKClause, createUniqueConstraint, dropTableStatements, externalTypesForJdbcType, findResource, getBatchQueryBuilderFactory, getEjbqlTranslatorFactory, getExtendedTypes, getIdentifiersEndQuote, getIdentifiersStartQuote, getJdbcEventLogger, getPkGenerator, getQuotingStrategy, initExtendedTypes, setBatchQueryBuilderFactory, setEjbqlTranslatorFactory, setPkGenerator, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, typeSupportsLengthpublic static final String TRIM_FUNCTION
public SQLServerAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories)
public SQLAction getAction(Query query, DataNode node)
getAction in interface DbAdaptergetAction in class JdbcAdapterpublic QualifierTranslator getQualifierTranslator(QueryAssembler queryAssembler)
getQualifierTranslator in interface DbAdaptergetQualifierTranslator in class JdbcAdapterpublic void createTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column)
createTableAppendColumn in interface DbAdaptercreateTableAppendColumn in class JdbcAdaptersqlBuffer - the StringBuffer to append the column type tocolumn - the DbAttribute defining the column to append type forpublic MergerFactory mergerFactory()
mergerFactory in interface DbAdaptermergerFactory in class SybaseAdapterCopyright © 2001–2018 Apache Cayenne. All rights reserved.