public class SQLServerAdapter extends SybaseAdapter
Cayenne DbAdapter implementation for Microsoft SQL Server engine.
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
Deprecated.
since 4.2 unused
|
batchQueryBuilderFactory, caseInsensitiveCollations, ejbqlTranslatorFactory, extendedTypes, logger, quotingStrategy, resourceLocator, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler| Constructor and Description |
|---|
SQLServerAdapter(RuntimeProperties runtimeProperties,
List<ExtendedType> defaultExtendedTypes,
List<ExtendedType> userExtendedTypes,
List<ExtendedTypeFactory> extendedTypeFactories,
ResourceLocator resourceLocator,
ValueObjectTypeRegistry valueObjectTypeRegistry) |
| Modifier and Type | Method and Description |
|---|---|
SQLAction |
getAction(Query query,
DataNode node)
Uses SQLServerActionBuilder to create the right action.
|
Function<Node,Node> |
getSqlTreeProcessor() |
List<String> |
getSystemSchemas() |
boolean |
supportsGeneratedKeysForBatchInserts()
Not supported, see: mssql-jdbc #245
|
bindParameter, configureExtendedTypes, createEJBQLTranslatorFactory, createPkGenerator, createQuotingStrategy, createTableAppendColumn, getBatchTerminatorbuildAttribute, createFkConstraint, createTable, createTableAppendPKClause, createUniqueConstraint, dropTableStatements, externalTypesForJdbcType, findResource, getEjbqlTranslatorFactory, getExtendedTypes, getJdbcEventLogger, getPkGenerator, getQuotingStrategy, getSelectTranslator, getSelectTranslator, getSystemCatalogs, getType, initExtendedTypes, setEjbqlTranslatorFactory, setPkGenerator, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, typeSupportsLength, unwrap@Deprecated public static final String TRIM_FUNCTION
public SQLServerAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry)
public boolean supportsGeneratedKeysForBatchInserts()
DbAdapter.supportsGeneratedKeys()public Function<Node,Node> getSqlTreeProcessor()
getSqlTreeProcessor in interface DbAdaptergetSqlTreeProcessor in class SybaseAdapterFunction that can adjust SQL tree to specific database flavourpublic SQLAction getAction(Query query, DataNode node)
getAction in interface DbAdaptergetAction in class JdbcAdapterpublic List<String> getSystemSchemas()
getSystemSchemas in interface DbAdaptergetSystemSchemas in class JdbcAdapterCopyright © 2001–2020 Apache Cayenne. All rights reserved.