|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.jdbc.sql.DBDictionary org.apache.openjpa.jdbc.sql.AbstractSQLServerDictionary org.apache.openjpa.jdbc.sql.SQLServerDictionary
public class SQLServerDictionary
Dictionary for Microsoft SQL Server.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.sql.DBDictionary |
---|
DBDictionary.SerializedData |
Field Summary | |
---|---|
boolean |
uniqueIdentifierAsVarbinary
Flag whether to treat UNIQUEIDENTIFIER as VARBINARY or VARCHAR |
static String |
VENDOR_JTDS
|
static String |
VENDOR_MICROSOFT
|
static String |
VENDOR_NETDIRECT
|
Fields inherited from interface org.apache.openjpa.jdbc.sql.JoinSyntaxes |
---|
SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL |
Constructor Summary | |
---|---|
SQLServerDictionary()
|
Method Summary | |
---|---|
protected void |
appendLength(SQLBuffer buf,
int type)
|
void |
appendXmlComparison(SQLBuffer buf,
String op,
FilterValue lhs,
FilterValue rhs,
boolean lhsxml,
boolean rhsxml)
If this dictionary supports XML type, use this method to append xml predicate. |
void |
connectedConfiguration(Connection conn)
This method is called when the dictionary first sees any connection. |
Reader |
getCharacterStream(ResultSet rs,
int column)
Obtain a Reader by using ResultSet.getClob(int) and
Clob.getCharacterStream() . |
Column[] |
getColumns(DatabaseMetaData meta,
DBIdentifier catalog,
DBIdentifier schemaName,
DBIdentifier tableName,
DBIdentifier columnName,
Connection conn)
Reflect on the schema to find columns matching the given table and column patterns. |
Column[] |
getColumns(DatabaseMetaData meta,
String catalog,
String schemaName,
String tableName,
String columnName,
Connection conn)
Reflect on the schema to find columns matching the given table and column patterns. |
InputStream |
getLOBStream(JDBCStore store,
ResultSet rs,
int column)
Obtain an InputStream by using ResultSet.getBlob(int) and
Blob.getBinaryStream() . |
String |
getSchemaCase()
Return DB specific schemaCase |
boolean |
isFatalException(int subtype,
SQLException ex)
Determine if the given SQL Exception is fatal or recoverable (such as a timeout). |
void |
setSupportsXMLColumn(boolean b)
|
Methods inherited from class org.apache.openjpa.jdbc.sql.AbstractSQLServerDictionary |
---|
appendSelectRange, getFullName, indexOf, setNull, substring |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VENDOR_MICROSOFT
public static final String VENDOR_NETDIRECT
public static final String VENDOR_JTDS
public boolean uniqueIdentifierAsVarbinary
Constructor Detail |
---|
public SQLServerDictionary()
Method Detail |
---|
public void connectedConfiguration(Connection conn) throws SQLException
DBDictionary
super.connectedConfiguration
.
connectedConfiguration
in class DBDictionary
SQLException
public Column[] getColumns(DatabaseMetaData meta, String catalog, String schemaName, String tableName, String columnName, Connection conn) throws SQLException
DBDictionary
getColumns
in class AbstractSQLServerDictionary
SQLException
public Column[] getColumns(DatabaseMetaData meta, DBIdentifier catalog, DBIdentifier schemaName, DBIdentifier tableName, DBIdentifier columnName, Connection conn) throws SQLException
DBDictionary
getColumns
in class DBDictionary
SQLException
protected void appendLength(SQLBuffer buf, int type)
appendLength
in class DBDictionary
public void appendXmlComparison(SQLBuffer buf, String op, FilterValue lhs, FilterValue rhs, boolean lhsxml, boolean rhsxml)
appendXmlComparison
in class DBDictionary
buf
- the SQL buffer to write the comparisonop
- the comparison operation to performlhs
- the left hand side of the comparisonrhs
- the right hand side of the comparisonlhsxml
- indicates whether the left operand maps to xmlrhsxml
- indicates whether the right operand maps to xmlpublic String getSchemaCase()
getSchemaCase
in interface IdentifierConfiguration
getSchemaCase
in class DBDictionary
public void setSupportsXMLColumn(boolean b)
setSupportsXMLColumn
in class DBDictionary
b
- boolean representing if XML columns are supportedpublic boolean isFatalException(int subtype, SQLException ex)
DBDictionary
isFatalException
in class DBDictionary
subtype
- A constant indicating the category of error as defined in StoreException
.ex
- original SQL Exception as raised by the database driver.
public InputStream getLOBStream(JDBCStore store, ResultSet rs, int column) throws SQLException
InputStream
by using ResultSet.getBlob(int)
and
Blob.getBinaryStream()
.
Unfortunately this will load entire BLOB into memory.
The alternative ResultSet.getBinaryStream(int)
provides true streaming but
the stream can be consumed only as long as ResultSet
is open.
getLOBStream
in class DBDictionary
SQLException
public Reader getCharacterStream(ResultSet rs, int column) throws SQLException
Reader
by using ResultSet.getClob(int)
and
Clob.getCharacterStream()
.
Unfortunately this will load entire CLOB into memory.
The alternative ResultSet.getCharacterStream(int)
provides true streaming but
the stream can be consumed only as long as ResultSet
is open.
getCharacterStream
in class DBDictionary
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |