Class AbstractSQLServerDictionary
java.lang.Object
org.apache.openjpa.jdbc.sql.DBDictionary
org.apache.openjpa.jdbc.sql.AbstractSQLServerDictionary
- All Implemented Interfaces:
JoinSyntaxes, Configurable, IdentifierConfiguration, ConnectionDecorator, LoggingConnectionDecorator.SQLWarningHandler
- Direct Known Subclasses:
SQLServerDictionary, SybaseDictionary
Dictionary for the SQL Server databases (Sybase and MS SQL Server).
-
Nested Class Summary
Nested classes/interfaces inherited from class DBDictionary
DBDictionary.DateMillisecondBehaviors, DBDictionary.SerializedData -
Field Summary
Fields inherited from class DBDictionary
_procs, _proxyManager, allowQueryTimeoutOnFindUpdate, allowsAliasInBulkClause, allowsBulkTargetInSubselect, arrayTypeName, autoAssignClause, autoAssignTypeName, backslashEscapesInStringLiterals, batchLimit, bigintTypeName, binaryTypeName, bitLengthFunction, bitTypeName, blobBufferSize, blobTypeName, booleanRepresentation, booleanTypeName, castFunction, catalogSeparator, ceilingFunction, CENTI, characterColumnSize, charTypeName, clobBufferSize, clobTypeName, closePoolSQL, concatenateDelimiter, concatenateFunction, conf, connected, CONS_NAME_AFTER, CONS_NAME_BEFORE, CONS_NAME_MID, constraintNameMode, createPrimaryKeys, crossJoinClause, currentDateFunction, currentTimeFunction, currentTimestampFunction, databaseProductName, databaseProductVersion, dateFractionDigits, datePrecision, dateTypeName, DECI, decimalTypeName, defaultSchemaName, delimitedCase, disableAlterSeqenceIncrementBy, disableSchemaFactoryColumnTypeErrors, distinctCountColumnSeparator, distinctTypeName, doubleTypeName, driverVendor, dropTableSQL, exceptFunction, extractDateTimeFieldFunction, fixedSizeTypeNames, fixedSizeTypeNameSet, floatTypeName, forUpdateClause, fractionalTypeNameSet, fullResultCollectionInOrderByRelation, getStringVal, inClauseLimit, indexPhysicalForeignKeys, initializationSQL, innerJoinClause, integerCastTypeName, integerTypeName, invalidColumnWordSet, invalidTableWordSet, isJDBC3, isJDBC4, javaObjectTypeName, javaToDbColumnNameProcessing, joinSyntax, lastGeneratedKeyQuery, leadingDelimiter, leftFunctionName, log, longCastTypeName, longVarbinaryTypeName, longVarcharTypeName, maxAutoAssignNameLength, maxColumnNameLength, maxConstraintNameLength, maxEmbeddedBlobSize, maxEmbeddedClobSize, maxIndexesPerTable, maxIndexNameLength, maxTableNameLength, MICRO, MILLI, NAME_ANY, NAME_SEQUENCE, NAME_TABLE, nameConcatenator, NANO, nativeSequenceType, naturalLogarithmFunction, nextSequenceQuery, NO_BATCH, nullTypeName, numericTypeName, otherTypeName, outerJoinClause, platform, RANGE_POST_DISTINCT, RANGE_POST_LOCK, RANGE_POST_SELECT, RANGE_PRE_DISTINCT, rangePosition, realTypeName, refTypeName, replaceFunctionName, reportsSuccessNoInfoOnBatchUpdates, requiresAliasForSubselect, requiresAutoCommitForMetaData, requiresCastForCaseStringResult, requiresCastForComparisons, requiresCastForExtractOperand, requiresCastForMathFunctions, requiresConditionForCrossJoin, requiresSearchStringEscapeForLike, requiresTargetForDelete, reservedWords, reservedWordSet, rightFunctionName, roundTimeToMillisec, SCHEMA_CASE_LOWER, SCHEMA_CASE_PRESERVE, SCHEMA_CASE_UPPER, schemaCase, searchStringEscape, searchStringNoEscape, SEC, selectWords, selectWordSet, sequenceNameSQL, sequenceSchemaSQL, sequenceSQL, setStringRightTruncationOn, simulateLocking, smallintTypeName, sqlStateCodes, storageLimitationsFatal, storeCharsAsNumbers, storeLargeNumbersAsStrings, stringLengthFunction, structTypeName, substringFunctionName, supportsAlterTableWithAddColumn, supportsAlterTableWithDropColumn, supportsAutoAssign, supportsCascadeDeleteAction, supportsCascadeUpdateAction, supportsCaseConversionForLob, supportsComments, supportsCorrelatedSubselect, supportsDefaultDeleteAction, supportsDefaultUpdateAction, supportsDeferredConstraints, supportsDelimitedIdentifiers, supportsForeignKeys, supportsForeignKeysComposite, supportsGeneralCaseExpression, supportsGetGeneratedKeys, supportsHaving, supportsLockingWithDistinctClause, supportsLockingWithInnerJoin, supportsLockingWithMultipleTables, supportsLockingWithOrderClause, supportsLockingWithOuterJoin, supportsLockingWithSelectRange, supportsModOperator, supportsMultipleNontransactionalResultSets, supportsNullDeleteAction, supportsNullTableForGetColumns, supportsNullTableForGetImportedKeys, supportsNullTableForGetIndexInfo, supportsNullTableForGetPrimaryKeys, supportsNullUniqueColumn, supportsNullUpdateAction, supportsParameterInSelect, supportsQueryTimeout, supportsRestrictDeleteAction, supportsRestrictUpdateAction, supportsSchemaForGetColumns, supportsSchemaForGetTables, supportsSelectEndIndex, supportsSelectForUpdate, supportsSelectFromFinalTable, supportsSelectStartIndex, supportsSimpleCaseExpression, supportsSubselect, supportsUniqueConstraints, supportsUnsizedCharOnCast, supportsUuidType, supportsXMLColumn, systemSchemas, systemSchemaSet, systemTables, systemTableSet, tableForUpdateClause, tableLengthIncludesSchema, tableTypes, timestampTypeName, timestampWithZoneTypeName, timeTypeName, timeWithZoneTypeName, tinyintTypeName, toLowerCaseFunction, toUpperCaseFunction, trailingDelimiter, trimBothFunction, trimLeadingFunction, trimSchemaName, trimStringColumns, trimTrailingFunction, typecastToStringTypeName, typeModifierSet, UNLIMITED, useGetBestRowIdentifierForPrimaryKeys, useGetBytesForBlobs, useGetObjectForBlobs, useGetStringForClobs, useJDBC4SetBinaryStream, useNativeSequenceCache, useSchemaName, useSetBytesForBlobs, useSetStringForClobs, useWildCardForCount, uuidTypeName, validationSQL, varbinaryTypeName, varcharTypeName, VENDOR_DATADIRECT, VENDOR_OTHER, xmlTypeEncoding, xmlTypeNameFields inherited from interface JoinSyntaxes
SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendSelectRange(SQLBuffer buf, long start, long end, boolean subselect) If this dictionary can select ranges, use this method to append the range SQL.Column[]getColumns(DatabaseMetaData meta, String catalog, String schemaName, String tableName, String colName, Connection conn) Reflect on the schema to find columns matching the given table and column patterns.getFullName(Index idx) Returns the full name of the index, including the schema (delimited by the result ofDBDictionary.catalogSeparator).voidsetNull(PreparedStatement stmnt, int idx, int colType, Column col) Set null as a parameter to the statement.voidsubstring(SQLBuffer buf, FilterValue str, FilterValue start, FilterValue length) SUBSTRING needs a length on SQL Server.toStringLiteral(String value) A string literal without the N prefix is converted to the code page of the database, so a value with a character outside ASCII may arrive as a different character.Methods inherited from class DBDictionary
addCastAsType, addErrorCode, allowsBulkUpdateOfJoinedTables, appendBulkPrimaryKeysIn, appendCast, appendLength, appendNullsPrecedence, appendNumericCast, appendSelect, appendSize, appendUpdates, appendXmlComparison, applyRange, assertSupport, calculateValue, canOuterJoin, closeDataSource, combineForeignKey, comment, comparison, configureNamingRules, connectedConfiguration, convertSchemaCase, convertSchemaCase, copy, copy, createIndexIfNecessary, createIndexIfNecessary, decorate, deleteStream, delimitAll, endConfiguration, executeQuery, fromDBName, getAddColumnSQL, getAddForeignKeySQL, getAddPrimaryKeySQL, getAlterSequenceSQL, getArray, getAsciiStream, getBatchFetchSize, getBatchLimit, getBatchUpdateCount, getBigDecimal, getBigInteger, getBinaryStream, getBlob, getBlobObject, getBoolean, getBooleanRepresentation, getByte, getBytes, getCalendar, getCastFunction, getCastFunction, getCatalogNameForMetadata, getCatalogNameForMetadata, getChar, getCharacterStream, getClob, getClobString, getColumnDBName, getColumnIdentifier, getColumnNameForMetadata, getColumnNameForMetadata, getColumns, getConversionKey, getCreateIndexSQL, getCreateSequenceSQL, getCreateTableSQL, getCreateTableSQL, getDate, getDate, getDateFractionDigits, getDeclareColumnSQL, getDefaultIdentifierRule, getDefaultSchemaName, getDeleteTableContentsSQL, getDeleteTargets, getDelimitedCase, getDelimitIdentifiers, getDouble, getDropColumnSQL, getDropForeignKeySQL, getDropIndexSQL, getDropPrimaryKeySQL, getDropSequenceSQL, getDropTableSQL, getExtractDateTimeFieldFunction, getExtractDateTimePartFunction, getExtractField, getExtractOperandCastType, getFloat, getForeignKeyConstraintSQL, getForUpdateClause, getFrom, getFromSelect, getFullIdentifier, getFullName, getFullName, getGeneratedKey, getGeneratedKeySequenceName, getGenKeySeqName, getIdentifierConcatenator, getIdentifierDelimiter, getIdentifierRule, getIdentifierRules, getIdentityColumnName, getImportedKeys, getImportedKeys, getImportedKeys, getImportedKeys, getIndexInfo, getIndexInfo, getInstant, getInt, getIntegerCastTypeName, getInvalidColumnWordSet, getInvalidTableWordSet, getIsNotNullSQL, getIsNullSQL, getJDBCType, getJDBCType, getJDBCType, getKey, getLeadingDelimiter, getLOBStream, getLocalDate, getLocalDateTime, getLocale, getLocalTime, getLog, getLong, getLongCastTypeName, getMajorVersion, getMarkerForInsertUpdate, getMillisecondBehavior, getMinorVersion, getNamingUtil, getNormalizingRule, getNumber, getNumberCastTypeName, getObject, getOffsetDateTime, getOffsetTime, getPlaceholderValueString, getPreferredType, getPrimaryKeyConstraintSQL, getPrimaryKeys, getPrimaryKeys, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromGetPrimaryKeys, getPrimaryKeysFromGetPrimaryKeys, getRef, getSchemaCase, getSchemaNameForMetadata, getSchemaNameForMetadata, getSelectOperation, getSelects, getSelectTableAliases, getSequence, getSequenceIncrement, getSequences, getSequences, getSequencesSQL, getSequencesSQL, getShort, getStoreCharsAsNumbers, getStoredProcedure, getStoredProcedureCallSQL, getStoredProcedureNameCandidates, getString, getStringCastTypeName, getSupportsDelimitedIdentifiers, getSupportsXMLColumn, getTableNameForMetadata, getTableNameForMetadata, getTables, getTables, getTime, getTimestamp, getTimestampPrecision, getTrailingDelimiter, getTrimSchemaName, getTypeName, getTypeName, getUniqueConstraintSQL, getValidColumnName, getValidColumnName, getValidColumnName, getValidColumnName, getValidDefaultSequenceName, getValidDefaultTableName, getValidForeignKeyName, getValidForeignKeyName, getValidIndexName, getValidIndexName, getValidPrimaryKeyName, getValidSequenceName, getValidSequenceName, getValidTableName, getValidTableName, getValidUniqueName, getValidUniqueName, getVersionColumn, getVersionColumn, getWhere, getXMLTypeEncoding, getYear, handleWarning, indexOf, insertBlobForStreamingLoad, insertClobForStreamingLoad, insertSize, isConnected, isDroppable, isFatalException, isImplicitJoin, isReplicationConnection, isSelect, isStoreCharsAsNumbersExplicit, isSystemIndex, isSystemIndex, isSystemSequence, isSystemSequence, isSystemSequence, isSystemTable, isSystemTable, isUnsizedDecimal, isUsingLimit, isUsingOffset, isUsingOrderBy, isUsingRange, left, makeNameValid, makeNameValid, makeNameValid, makeNameValid, matchErrorState, mathFunction, needsToCreateIndex, needsToCreateIndex, newColumn, newForeignKey, newIndex, newPrimaryKey, newSequence, newStoreException, newTable, normalize, prepareStatement, processDBColumnName, putBytes, putChars, putString, refSchemaComponents, replace, right, serialize, setArray, setAsciiStream, setBatchLimit, setBigDecimal, setBigInteger, setBinaryStream, setBlob, setBlobObject, setBoolean, setBooleanRepresentation, setByte, setBytes, setCalendar, setChar, setCharacterStream, setClob, setClobString, setConfiguration, setDate, setDate, setDateMillisecondBehavior, setDefaultSchemaName, setDelimitedCase, setDelimitIdentifiers, setDouble, setFloat, setInstant, setInt, setJoinSyntax, setLeadingDelimiter, setLocalDate, setLocalDateTime, setLocale, setLocalTime, setLong, setMajorVersion, setMinorVersion, setNumber, setObject, setOffsetDateTime, setOffsetTime, setQueryTimeout, setRef, setShort, setStatementQueryTimeout, setStoreCharsAsNumbers, setString, setSupportsDelimitedIdentifiers, setSupportsXMLColumn, setTime, setTimeouts, setTimeouts, setTimestamp, setTrailingDelimiter, setTrimSchemaName, setTyped, setUnknown, setUnknown, setXMLTypeEncoding, setYear, shorten, startConfiguration, storageWarning, supportsDeferredForeignKeyConstraints, supportsDeferredUniqueConstraints, supportsDeleteAction, supportsIsolationForUpdate, supportsLocking, supportsRandomAccessResultSet, supportsUpdateAction, toBulkOperation, toDBName, toDBName, toDelete, toJDBCEscapedDateTimeLiteral, toNativeJoin, toOperation, toOperation, toSelect, toSelect, toSelect, toSelect, toSelect, toSelectCount, toSnakeCase, toSQL92Join, toTableUpdate, toTraditionalJoin, toTypedDateTimeLiteral, toUpdate, updateBlob, updateClob, validateBatchProcess, validateDBSpecificBatchProcess, versionEqualOrEarlierThan, versionEqualOrLaterThan, versionLaterThan
-
Constructor Details
-
AbstractSQLServerDictionary
public AbstractSQLServerDictionary()
-
-
Method Details
-
getColumns
public Column[] getColumns(DatabaseMetaData meta, String catalog, String schemaName, String tableName, String colName, Connection conn) throws SQLException Description copied from class:DBDictionaryReflect on the schema to find columns matching the given table and column patterns.- Overrides:
getColumnsin classDBDictionary- Throws:
SQLException
-
getFullName
Description copied from class:DBDictionaryReturns the full name of the index, including the schema (delimited by the result ofDBDictionary.catalogSeparator).- Overrides:
getFullNamein classDBDictionary
-
setNull
Description copied from class:DBDictionarySet null as a parameter to the statement. The column type will come fromTypes.- Overrides:
setNullin classDBDictionary- Throws:
SQLException
-
toStringLiteral
A string literal without the N prefix is converted to the code page of the database, so a value with a character outside ASCII may arrive as a different character. Such a value is bound as a parameter instead, which the driver sends as Unicode.- Overrides:
toStringLiteralin classDBDictionary
-
appendSelectRange
Description copied from class:DBDictionaryIf this dictionary can select ranges, use this method to append the range SQL.- Overrides:
appendSelectRangein classDBDictionary
-
substring
SUBSTRING needs a length on SQL Server. Without one, the length of the string in bytes is used: it is never less than the number of characters left, also counts trailing blanks (which LEN ignores), and a start beyond the end of the string gives the empty string instead of the error a negative length would cause.- Overrides:
substringin classDBDictionary- Parameters:
buf- the SQL buffer to write the substring invocation tostr- a query value representing the target stringstart- a query value representing the start indexlength- a query value representing the length of substring, or null for none
-