java.sql.SQLXML Java Examples
The following examples show how to use
java.sql.SQLXML.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CalciteRemoteDriverTest.java From calcite with Apache License 2.0 | 6 votes |
/** Check that the "get" conversion table looks like Table B-5 in JDBC 4.1 * specification */ @Test void testTableB6() { SqlType[] columns = { SqlType.TINYINT, SqlType.SMALLINT, SqlType.INTEGER, SqlType.BIGINT, SqlType.REAL, SqlType.FLOAT, SqlType.DOUBLE, SqlType.DECIMAL, SqlType.NUMERIC, SqlType.BIT, SqlType.BOOLEAN, SqlType.CHAR, SqlType.VARCHAR, SqlType.LONGVARCHAR, SqlType.BINARY, SqlType.VARBINARY, SqlType.LONGVARBINARY, SqlType.DATE, SqlType.TIME, SqlType.TIMESTAMP, SqlType.CLOB, SqlType.BLOB, SqlType.ARRAY, SqlType.REF, SqlType.DATALINK, SqlType.STRUCT, SqlType.JAVA_OBJECT, SqlType.ROWID, SqlType.NCHAR, SqlType.NVARCHAR, SqlType.LONGNVARCHAR, SqlType.NCLOB, SqlType.SQLXML }; final PrintWriter out = CalciteSystemProperty.DEBUG.value() ? Util.printWriter(System.out) : new PrintWriter(new StringWriter()); for (SqlType.Method row : SqlType.Method.values()) { out.print(pad(row.methodName)); for (SqlType column : columns) { out.print(SqlType.canGet(row, column) ? "x " : ". "); } out.println(); } }
Example #2
Source File: PreparedStatementEnvelope.java From cactoos-jdbc with MIT License | 5 votes |
@Override public void setSQLXML( final int parameterIndex, final SQLXML xmlObject ) throws SQLException { this.origin.setSQLXML(parameterIndex, xmlObject); }
Example #3
Source File: AbstractMemoryResultSetMerger.java From sharding-jdbc-1.5.1 with Apache License 2.0 | 5 votes |
@Override public Object getValue(final String columnLabel, final Class<?> type) throws SQLException { if (Blob.class == type || Clob.class == type || Reader.class == type || InputStream.class == type || SQLXML.class == type) { throw new SQLFeatureNotSupportedException(); } return currentResultSetRow.getCell(labelAndIndexMap.get(columnLabel)); }
Example #4
Source File: LogicalConnection40.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public SQLXML createSQLXML() throws SQLException { try { checkForNullPhysicalConnection(); return physicalConnection_.createSQLXML(); } catch (SQLException sqle) { notifyException(sqle); throw sqle; } }
Example #5
Source File: Jdbc4SqlXmlHandler.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public Source getXmlAsSource(ResultSet rs, String columnName, Class<? extends Source> sourceClass) throws SQLException { SQLXML xmlObject = rs.getSQLXML(columnName); if (xmlObject == null) { return null; } return (sourceClass != null ? xmlObject.getSource(sourceClass) : xmlObject.getSource(DOMSource.class)); }
Example #6
Source File: TeiidRSProvider.java From teiid-spring-boot with Apache License 2.0 | 5 votes |
private InputStream handleResult(String charSet, Object result) { if (result == null) { return null; // or should this be an empty result? } try { if (result instanceof SQLXML) { if (charSet != null) { XMLSerialize serialize = new XMLSerialize(); serialize.setTypeString("blob"); //$NON-NLS-1$ serialize.setDeclaration(true); serialize.setEncoding(charSet); serialize.setDocument(true); return ((BlobType) XMLSystemFunctions.serialize(serialize, new XMLType((SQLXML) result))) .getBinaryStream(); } return ((SQLXML) result).getBinaryStream(); } else if (result instanceof Blob) { return ((Blob) result).getBinaryStream(); } else if (result instanceof Clob) { return new ReaderInputStream(((Clob) result).getCharacterStream(), charSet == null ? Charset.defaultCharset() : Charset.forName(charSet)); } return new ByteArrayInputStream( result.toString().getBytes(charSet == null ? Charset.defaultCharset() : Charset.forName(charSet))); } catch (SQLException | TransformationException e) { throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage(), e); } }
Example #7
Source File: Jdbc4SqlXmlHandler.java From spring-analysis-note with MIT License | 5 votes |
@Override @Nullable public Source getXmlAsSource(ResultSet rs, int columnIndex, @Nullable Class<? extends Source> sourceClass) throws SQLException { SQLXML xmlObject = rs.getSQLXML(columnIndex); if (xmlObject == null) { return null; } return (sourceClass != null ? xmlObject.getSource(sourceClass) : xmlObject.getSource(DOMSource.class)); }
Example #8
Source File: StubWebRowSetImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Override public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); }
Example #9
Source File: Statement.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override public SQLXML getSQLXML(String parameterName) throws SQLException { // TODO Auto-generated method stub return null; }
Example #10
Source File: StubSyncResolver.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Override public SQLXML getSQLXML(int columnIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); }
Example #11
Source File: SnowflakePreparedStatementV1.java From snowflake-jdbc with Apache License 2.0 | 4 votes |
@Override public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { throw new SQLFeatureNotSupportedException(); }
Example #12
Source File: StubCachedRowSetImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Override public SQLXML getSQLXML(int columnIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); }
Example #13
Source File: StubCachedRowSetImpl.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@Override public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); }
Example #14
Source File: MemoryMergedResultTest.java From shardingsphere with Apache License 2.0 | 4 votes |
@Test(expected = SQLFeatureNotSupportedException.class) public void assertGetValueForSQLXML() throws SQLException { memoryMergedResult.getValue(1, SQLXML.class); }
Example #15
Source File: ConnectionStub.java From FHIR with Apache License 2.0 | 4 votes |
@Override public SQLXML createSQLXML() throws SQLException { // Stub Only return null; }
Example #16
Source File: ResultSetImpl.java From db with GNU Affero General Public License v3.0 | 4 votes |
@Override public SQLXML getSQLXML(String columnLabel) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. }
Example #17
Source File: MockPreparedStatement.java From doma with Apache License 2.0 | 4 votes |
@Override public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { AssertionUtil.notYetImplemented(); }
Example #18
Source File: SimonResultSet.java From javasimon with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { rset.updateSQLXML(columnLabel, xmlObject); }
Example #19
Source File: AutomaticConnection.java From Quicksql with MIT License | 4 votes |
@Override public SQLXML createSQLXML() throws SQLException { return connection.createSQLXML(); }
Example #20
Source File: UnsupportedShardResultSet.java From Zebra with Apache License 2.0 | 4 votes |
@Override public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { throw new UnsupportedOperationException("Zebra unsupport updateSQLXML"); }
Example #21
Source File: NetResultSet40.java From spliceengine with GNU Affero General Public License v3.0 | 4 votes |
public SQLXML getSQLXML(int columnIndex) throws SQLException { throw SQLExceptionFactory.notImplemented ("getSQLXML (int)"); }
Example #22
Source File: NonUpdatableRowsResultSet.java From gemfirexd-oss with Apache License 2.0 | 4 votes |
public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { noUpdateException(columnIndex); }
Example #23
Source File: HoneycombConnectionDecorator.java From honeycomb with MIT License | 4 votes |
@Override public SQLXML createSQLXML() throws SQLException { return connection.createSQLXML(); }
Example #24
Source File: EmbedCallableStatement40.java From gemfirexd-oss with Apache License 2.0 | 4 votes |
public SQLXML getSQLXML(String parametername) throws SQLException { throw Util.notImplemented(); }
Example #25
Source File: StubWebRowSetImpl.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Override public SQLXML getSQLXML(int columnIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); }
Example #26
Source File: StubJdbcRowSetImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Override public SQLXML getSQLXML(int columnIndex) throws SQLException { throw new UnsupportedOperationException("Not supported yet."); }
Example #27
Source File: JdbcPoolConnection.java From XPagesExtensionLibrary with Apache License 2.0 | 4 votes |
public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { rs.updateSQLXML(columnLabel, xmlObject); }
Example #28
Source File: LogicalPreparedStatement40.java From gemfirexd-oss with Apache License 2.0 | 4 votes |
public void setSQLXML(int arg0, SQLXML arg1) throws SQLException { getPhysPs().setSQLXML(arg0, arg1); }
Example #29
Source File: CallableStatementWrapper.java From Oceanus with Apache License 2.0 | 4 votes |
@Override public SQLXML getSQLXML(String parameterName) throws SQLException { // TODO Auto-generated method stub return null; }
Example #30
Source File: ResultSetEnvelope.java From cactoos-jdbc with MIT License | 4 votes |
@Override public void updateSQLXML(final int index, final SQLXML value) throws SQLException { this.origin.updateSQLXML(index, value); }