rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
} else if (sqlState.startsWith("42")) { | } else if (sqlState.startsWith(SQLState.LSE_COMPILATION_PREFIX)) { | public SQLException getSQLException(String message, String messageId, SQLException next, int severity, Throwable t, Object[] args) { String sqlState = StandardException.getSQLStateFromIdentifier(messageId); SQLException ex = new SQLException(message, sqlState, severity, t); if (sqlSt... |
} else if (sqlState.startsWith(SQLState.UNSUPPORTED_PREFIX)) { ex = new SQLFeatureNotSupportedException(message, sqlState, severity, t); | public SQLException getSQLException(String message, String messageId, SQLException next, int severity, Throwable t, Object[] args) { String sqlState = StandardException.getSQLStateFromIdentifier(messageId); SQLException ex = new SQLException(message, sqlState, severity, t); if (sqlSt... | |
if ( elementNamespaces != null ) { tagScript.setNamespacesMap( elementNamespaces ); elementNamespaces = null; } | public void startElement( String namespaceURI, String localName, String qName, Attributes list) throws SAXException { try { // add check to ensure namespace URI is "" for no namespace if ( namespaceURI == null ) { ... | |
if ( elementNamespaces == null ) { elementNamespaces = new HashMap(); } elementNamespaces.put(prefix, namespaceURI); | public void startPrefixMapping(String prefix, String namespaceURI) throws SAXException { // Register this prefix mapping ArrayStack stack = (ArrayStack) namespaces.get(prefix); if (stack == null) { stack = new ArrayStack(); namespaces.put(prefix, stack); } ... | |
public void registerTagLibrary( String namespaceURI, String className) { | public void registerTagLibrary(String namespaceURI, TagLibrary taglib) { | public void registerTagLibrary( String namespaceURI, String className) { if (log.isDebugEnabled()) { log.debug("Registering tag library to: " + namespaceURI + " taglib: " + className); } taglibs.put(namespaceURI, className); if (isExportLibrar... |
log.debug("Registering tag library to: " + namespaceURI + " taglib: " + className); | log.debug("Registering tag library to: " + namespaceURI + " taglib: " + taglib); | public void registerTagLibrary( String namespaceURI, String className) { if (log.isDebugEnabled()) { log.debug("Registering tag library to: " + namespaceURI + " taglib: " + className); } taglibs.put(namespaceURI, className); if (isExportLibrar... |
taglibs.put(namespaceURI, className); | taglibs.put(namespaceURI, taglib); | public void registerTagLibrary( String namespaceURI, String className) { if (log.isDebugEnabled()) { log.debug("Registering tag library to: " + namespaceURI + " taglib: " + className); } taglibs.put(namespaceURI, className); if (isExportLibrar... |
parent.registerTagLibrary( namespaceURI, className ); | parent.registerTagLibrary( namespaceURI, taglib ); } if (isExportLibraries() && parent != null) { parent.registerTagLibrary( namespaceURI, taglib ); | public void registerTagLibrary( String namespaceURI, String className) { if (log.isDebugEnabled()) { log.debug("Registering tag library to: " + namespaceURI + " taglib: " + className); } taglibs.put(namespaceURI, className); if (isExportLibrar... |
public StaticTag(String uri, String localName, String qname) { this.uri = uri; this.localName = localName; this.qname = qname; | public StaticTag() { | public StaticTag(String uri, String localName, String qname) { this.uri = uri; this.localName = localName; this.qname = qname; } |
return new ConstantExpression(attributeValue);; | return new ConstantExpression(attributeValue); | public Expression createExpression( ExpressionFactory factory, String tagName, String attributeName, String attributeValue) throws Exception { ExpressionFactory myFactory = getExpressionFactory(); if (myFactory == null) { myFactory = factory; } ... |
protected Dependable getDependable(DataDictionary dd, UUID dependableObjectID) throws StandardException | public final Dependable getDependable(String dependableObjectID) throws java.sql.SQLException | protected Dependable getDependable(DataDictionary dd, UUID dependableObjectID) throws StandardException { switch (formatId) { case StoredFormatIds.ALIAS_DESCRIPTOR_FINDER_V01_ID: return dd.getAliasDescriptor(dependableObjectID); case StoredFormatIds.CONGLOMERATE_DESCRIPTOR_FINDER_V01_ID: return dd.getCong... |
switch (formatId) { case StoredFormatIds.ALIAS_DESCRIPTOR_FINDER_V01_ID: return dd.getAliasDescriptor(dependableObjectID); case StoredFormatIds.CONGLOMERATE_DESCRIPTOR_FINDER_V01_ID: return dd.getConglomerateDescriptor(dependableObjectID); case StoredFormatIds.CONSTRAINT_DESCRIPTOR_FINDER_V01_ID: return dd.getConstra... | return getDependable(recreateUUID(dependableObjectID)); | protected Dependable getDependable(DataDictionary dd, UUID dependableObjectID) throws StandardException { switch (formatId) { case StoredFormatIds.ALIAS_DESCRIPTOR_FINDER_V01_ID: return dd.getAliasDescriptor(dependableObjectID); case StoredFormatIds.CONGLOMERATE_DESCRIPTOR_FINDER_V01_ID: return dd.getCong... |
if(!isDependentTable) generateParameterHolders(acb); | public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { //If the DML is on the temporary table, generate the code to mark temporary table as modified in the current UOW generateCodeForTemporaryTable(acb, mb); /* generate the parameters */ if(!isDependentTable) g... | |
SystemColumnImpl( String name, int id, int ignoreP, int ignoreS, boolean nullability, String dataType, boolean builtInType, int maxLength ) { this(name, id, nullability, dataType, builtInType, maxLength); } | private SystemColumnImpl(String name, DataTypeDescriptor type) { this.name = name; this.type = type; } | SystemColumnImpl( String name, int id, int ignoreP, int ignoreS, boolean nullability, String dataType, boolean builtInType, int maxLength ){ this(name, id, nullability, dataType, builtInType, maxLength);} |
UUID conglomerateUUID) | long conglomerateNumber) | public ConglomerateDescriptor getConglomerateDescriptor( UUID conglomerateUUID) throws StandardException { return conglomerateDescriptorList.getConglomerateDescriptor(conglomerateUUID); } |
return conglomerateDescriptorList.getConglomerateDescriptor(conglomerateUUID); | return conglomerateDescriptorList.getConglomerateDescriptor(conglomerateNumber); | public ConglomerateDescriptor getConglomerateDescriptor( UUID conglomerateUUID) throws StandardException { return conglomerateDescriptorList.getConglomerateDescriptor(conglomerateUUID); } |
UUID referencedConstraintId, | ReferencedKeyConstraintDescriptor referencedConstraintDescriptor, | public ForeignKeyConstraintDescriptor newForeignKeyConstraintDescriptor( TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] fkColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, UUID referencedConstraintId, ... |
referencedConstraintId, isEnabled, raDeleteRule, raUpdateRule); | referencedConstraintDescriptor, isEnabled, raDeleteRule, raUpdateRule); | public ForeignKeyConstraintDescriptor newForeignKeyConstraintDescriptor( TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] fkColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, UUID referencedConstraintId, ... |
NumberDataValue getDataValue(int value); | NumberDataValue getDataValue(Integer value); | NumberDataValue getDataValue(int value); |
public void backup(String backupDir) throws StandardException; | public void backup(String backupDir, boolean wait) throws StandardException; | public void backup(String backupDir) throws StandardException; |
public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles) throws StandardException ; | public void backupAndEnableLogArchiveMode( String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait) throws StandardException; | public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles) throws StandardException ; |
public HasVariantValueNodeVisitor(int variantType, boolean ignoreParameters) | public HasVariantValueNodeVisitor() | public HasVariantValueNodeVisitor(int variantType, boolean ignoreParameters) { this.variantType = variantType; this.ignoreParameters = ignoreParameters; if (SanityManager.DEBUG) { SanityManager.ASSERT(variantType >= Qualifier.VARIANT, "bad variantType"); // note: there is no point in (variantType == Qualifier.... |
this.variantType = variantType; this.ignoreParameters = ignoreParameters; | this.variantType = Qualifier.VARIANT; this.ignoreParameters = false; | public HasVariantValueNodeVisitor(int variantType, boolean ignoreParameters) { this.variantType = variantType; this.ignoreParameters = ignoreParameters; if (SanityManager.DEBUG) { SanityManager.ASSERT(variantType >= Qualifier.VARIANT, "bad variantType"); // note: there is no point in (variantType == Qualifier.... |
SanityManager.ASSERT(variantType >= Qualifier.VARIANT, "bad variantType"); SanityManager.ASSERT(variantType <= Qualifier.QUERY_INVARIANT, "bad variantType"); | SanityManager.ASSERT(Qualifier.VARIANT < Qualifier.SCAN_INVARIANT, "qualifier constants not ordered as expected"); SanityManager.ASSERT(Qualifier.SCAN_INVARIANT < Qualifier.QUERY_INVARIANT, "qualifier constants not ordered as expected"); | public HasVariantValueNodeVisitor(int variantType, boolean ignoreParameters) { this.variantType = variantType; this.ignoreParameters = ignoreParameters; if (SanityManager.DEBUG) { SanityManager.ASSERT(variantType >= Qualifier.VARIANT, "bad variantType"); // note: there is no point in (variantType == Qualifier.... |
System.out.println("Some more isolation testing using SQL and JDBC api"); cs1 = xac.getConnection(); s = cs1.createStatement(); printState("initial local", cs1); System.out.println("Issue setTransactionIsolation in local transaction"); cs1.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED); printState("s... | protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate("create procedure checkConn2(in dsname varchar(20... | |
for (int i = 0; i < num_rows; i++) | int row_count = 0; try | private void createAndLoadTable( Connection conn, boolean create_table, String tblname, int num_rows) throws SQLException { if (create_table) { Statement s = conn.createStatement(); s.execute( "create table " + tblname + ... |
insert_stmt.setInt(1, i); insert_stmt.setInt(2, i * 10); insert_stmt.setInt(3, i * 100); insert_stmt.setInt(4, -i); insert_stmt.setString(5, data1_str); insert_stmt.setString(6, data2_str); | for (;row_count < num_rows; row_count++) { insert_stmt.setInt(1, row_count); insert_stmt.setInt(2, row_count * 10); insert_stmt.setInt(3, row_count * 100); insert_stmt.setInt(4, -row_count); insert_stmt.setString(5, data1_str); insert_stmt.setString(6, data2_str); | private void createAndLoadTable( Connection conn, boolean create_table, String tblname, int num_rows) throws SQLException { if (create_table) { Statement s = conn.createStatement(); s.execute( "create table " + tblname + ... |
insert_stmt.execute(); | insert_stmt.execute(); } } catch (SQLException sqle) { System.out.println( "Exception while trying to insert row number: " + row_count); throw sqle; | private void createAndLoadTable( Connection conn, boolean create_table, String tblname, int num_rows) throws SQLException { if (create_table) { Statement s = conn.createStatement(); s.execute( "create table " + tblname + ... |
beginTest(conn, test_name); int[] test_cases = {4000}; for (int i = 0; i < test_cases.length; i++) { simpleDeleteAllRows( conn, true, false, "APP", table_name, test_cases[i]); for (int j = 0; j < 100; j++) { deleteAllRows( conn, false, false, "APP", table_name, test_cases[i]); } executeQuery(conn, "drop table "... | private void test2( Connection conn, String test_name, String table_name) throws SQLException { } | |
if (logFactory.logArchived()) { if(reEncrypt) throw StandardException.newException( SQLState.CANNOT_REENCRYPT_LOG_ARCHIVED_DATABASE); else throw StandardException.newException( SQLState.CANNOT_ENCRYPT_LOG_ARCHIVED_DATABASE); } | private void canEncryptDatabase(boolean reEncrypt) throws StandardException { String feature = (reEncrypt ? "newBootPassword/newEncryptionKey attribute" : "dataEncryption attribute on an existing database"); // check if the database versi... | |
if (encryptDatabase) { if (isReadOnly()) { if (reEncrypt) throw StandardException.newException( SQLState.CANNOT_REENCRYPT_READONLY_DATABASE); else throw StandardException.newException( SQLState.CANNOT_ENCRYPT_READONLY_DATABASE); } } | private void setupEncryptionEngines(boolean create, String restoreFromBackup, Properties properties) throws StandardException { // check if user has requested to encrypt the database or it is an... | |
String s; boolean ok; Object obj = null; | private static void assertRowInResultSet(ResultSet rs, int rowNum, Object [] expectedRow, boolean asTrimmedStrings) throws SQLException { String s; boolean ok; Object obj = null; ResultSetMetaData rsmd = rs.getMetaData(); for (int i = 0; i < expectedRow.length; i++) ... | |
s = expectedRow[i].toString(); | String s = expectedRow[i].toString(); | private static void assertRowInResultSet(ResultSet rs, int rowNum, Object [] expectedRow, boolean asTrimmedStrings) throws SQLException { String s; boolean ok; Object obj = null; ResultSetMetaData rsmd = rs.getMetaData(); for (int i = 0; i < expectedRow.length; i++) ... |
if (obj != null) obj = ((String)obj).trim(); | private static void assertRowInResultSet(ResultSet rs, int rowNum, Object [] expectedRow, boolean asTrimmedStrings) throws SQLException { String s; boolean ok; Object obj = null; ResultSetMetaData rsmd = rs.getMetaData(); for (int i = 0; i < expectedRow.length; i++) ... | |
ok = (rs.wasNull() && (expectedRow[i] == null)) | boolean ok = (rs.wasNull() && (expectedRow[i] == null)) | private static void assertRowInResultSet(ResultSet rs, int rowNum, Object [] expectedRow, boolean asTrimmedStrings) throws SQLException { String s; boolean ok; Object obj = null; ResultSetMetaData rsmd = rs.getMetaData(); for (int i = 0; i < expectedRow.length; i++) ... |
rs = stmt2.executeQuery("values(1)"); stmt2.close(); assert_(rs.isClosed(), "rs should be closed"); Connection conn2 = ij.startJBMS(); stmt2 = conn2.createStatement(); rs = stmt2.executeQuery("values(1)"); conn2.close(); assert_(rs.isClosed(), "rs should be closed"); | void t_isClosed(){ try { Statement stmt = conn.createStatement(); // simple open/read/close test ResultSet rs = stmt.executeQuery("values(1)"); assert_(!rs.isClosed(), "rs should be open"); while (rs.next()); assert_(!rs.isClosed(), "rs should... | |
void accumulate(Object[] inputRow, Object[] accumulateRow) | void accumulate(ExecRow inputRow, ExecRow accumulateRow) | void accumulate(Object[] inputRow, Object[] accumulateRow) throws StandardException { DataValueDescriptor inputColumn = null; if (SanityManager.DEBUG) { SanityManager.ASSERT((inputRow != null) && (accumulateRow != null), "bad accumulate call"); } DataValueDescriptor aggregatorColumn = (DataValueDescript... |
DataValueDescriptor aggregatorColumn = (DataValueDescriptor) accumulateRow[aggregatorColumnId]; inputColumn = (DataValueDescriptor) inputRow[inputColumnId]; | DataValueDescriptor aggregatorColumn = accumulateRow.getColumn(aggregatorColumnId + 1); inputColumn = inputRow.getColumn(inputColumnId + 1); | void accumulate(Object[] inputRow, Object[] accumulateRow) throws StandardException { DataValueDescriptor inputColumn = null; if (SanityManager.DEBUG) { SanityManager.ASSERT((inputRow != null) && (accumulateRow != null), "bad accumulate call"); } DataValueDescriptor aggregatorColumn = (DataValueDescript... |
void merge(Object[] inputRow, Object[] mergeRow) | void merge(ExecRow inputRow, ExecRow mergeRow) | void merge(Object[] inputRow, Object[] mergeRow) throws StandardException { DataValueDescriptor mergeColumn = (DataValueDescriptor) mergeRow[aggregatorColumnId]; DataValueDescriptor inputColumn = (DataValueDescriptor) inputRow[aggregatorColumnId]; merge(inputColumn, mergeColumn); } |
DataValueDescriptor mergeColumn = (DataValueDescriptor) mergeRow[aggregatorColumnId]; DataValueDescriptor inputColumn = (DataValueDescriptor) inputRow[aggregatorColumnId]; | DataValueDescriptor mergeColumn = mergeRow.getColumn(aggregatorColumnId + 1); DataValueDescriptor inputColumn = inputRow.getColumn(aggregatorColumnId + 1); | void merge(Object[] inputRow, Object[] mergeRow) throws StandardException { DataValueDescriptor mergeColumn = (DataValueDescriptor) mergeRow[aggregatorColumnId]; DataValueDescriptor inputColumn = (DataValueDescriptor) inputRow[aggregatorColumnId]; merge(inputColumn, mergeColumn); } |
markResultSetsClosed(); | markResultSetsClosed(true); | private void flowExecute(int executeType, String sql) throws SqlException { checkForClosedStatement(); // Per jdbc spec (see java.sql.Statement.close() javadoc) checkAutoGeneratedKeysParameters(); clearWarningsX(); // Per jdbc spec 0.7, and getWarnings() javadoc sql = escape(sql); ... |
if (resultSetList_ != null) { for (int i = 0; i < resultSetList_.length; i++) { if (resultSetList_[i] != null) { resultSetList_[i].markClosed(); } resultSetList_[i] = null; } } if (generatedKeysResultSet_ != null) { generatedKeysResultSet_.markClosed(); } if (resultSet_ != null) { resultSet_.markClosed(); } resultSet_ ... | markResultSetsClosed(false); | void markResultSetsClosed() { if (resultSetList_ != null) { for (int i = 0; i < resultSetList_.length; i++) { if (resultSetList_[i] != null) { resultSetList_[i].markClosed(); } resultSetList_[i] = null; } } if... |
public SqlWarning(LogWriter logWriter, Sqlca sqlca) { super(); sqlca_ = sqlca; if (logWriter != null) { logWriter.traceDiagnosable(this); } | public SqlWarning(LogWriter logwriter, MessageId msgid, Object[] args, Throwable cause) { super(logwriter, msgid, args, cause); | public SqlWarning(LogWriter logWriter, Sqlca sqlca) { super(); sqlca_ = sqlca; if (logWriter != null) { logWriter.traceDiagnosable(this); } } |
Section getPositionedUpdateSection(String cursorName, boolean useExecuteImmediateSection) throws SqlException { Section querySection = (Section) positionedUpdateCursorNameToQuerySection_.get(cursorName); if (querySection != null) { Section section = getPositionedUpdateSection(querySection); section.setClientCur... | Section getPositionedUpdateSection(Section querySection) throws SqlException { Connection connection = agent_.connection_; return getDynamicSection(connection.holdability()); | Section getPositionedUpdateSection(String cursorName, boolean useExecuteImmediateSection) throws SqlException { Section querySection = (Section) positionedUpdateCursorNameToQuerySection_.get(cursorName); // If querySection is null, then the user must have provided a bad cursor name. // Otherwis... |
BatchUpdateException bue = new BatchUpdateException(logWriter_, "Non-atomic batch failure. The batch was submitted, but " + "at least one exception occurred on an individual member of the batch. " + "Use getNextException() to retrieve the exceptions for specific batched elements.", updateCounts); | BatchUpdateException bue = new BatchUpdateException(logWriter_, new MessageId(SQLState.BATCH_NON_ATOMIC_FAILURE), updateCounts); | public final void endBatchedReadChain(int[] updateCounts, SqlException accumulatedExceptions) throws BatchUpdateException { disableBatchedExceptionTracking(); for (int i = 0; i < batchedExceptionGenerated_.length; i++) { if (batchedExceptionGenerated_[i]) { updateCounts[i] = ... |
void markClosed(boolean removeListener) { openOnClient_ = false; openOnServer_ = false; statement_.resetCursorNameAndRemoveFromWhereCurrentOfMappings(); statement_.removeClientCursorNameFromCache(); markPositionedUpdateDeletePreparedStatementsClosed(); if (removeListener) { connection_.CommitAndRollbackListeners_.remov... | void markClosed() { markClosed(false); | void markClosed(boolean removeListener) { openOnClient_ = false; openOnServer_ = false; statement_.resetCursorNameAndRemoveFromWhereCurrentOfMappings(); // for SELECT...FOR UPDATE queries statement_.removeClientCursorNameFromCache(); markPositionedUpdateDeletePreparedStatementsClo... |
return new SAXReader( new SAXParser() ); | SAXParser parser = new SAXParser(); parser.setProperty( "http: "match" ); parser.setProperty( "http: "match" ); return new SAXReader( parser ); | protected SAXReader createSAXReader() throws Exception { // installs the NeckHTML parser return new SAXReader( new SAXParser() ); } |
xads = getXADataSource(); | xads = TestDataSourceFactory.getXADataSource(); | public void setUp() throws SQLException { xads = getXADataSource(); xac = xads.getXAConnection(); xar = xac.getXAResource(); con = xac.getConnection(); assertFalse("Connection must be open initially", con.isClosed()); con.setAutoCommit(false); } |
ps.setQueryTimeout(0L); rs = ps.execute(lcc, false); | rs = ps.execute(lcc, false, 0L); | static boolean validateConstraint ( String constraintName, String constraintText, TableDescriptor td, LanguageConnectionContext lcc, boolean isCheckConstraint ) throws StandardException { StringBuffer checkStmt = new StringBuffer(); /* should not use select sum(not(<check-predicate>) ? ... |
ResultSet execute(LanguageConnectionContext lcc, boolean rollbackParentContext) throws StandardException; | ResultSet execute(Activation activation, boolean executeQuery, boolean executeUpdate, boolean rollbackParentContext, long timeoutMillis) throws StandardException; | ResultSet execute(LanguageConnectionContext lcc, boolean rollbackParentContext) throws StandardException; |
SanityManager.ASSERT(iosInProgress == 0, | SanityManager.ASSERT( (iosInProgress == 0) || getCommittedDropState(), | synchronized void closeContainer() { if (SanityManager.DEBUG) { SanityManager.ASSERT(iosInProgress == 0, "Container closed while IO operations are in progress. " + " This should not happen."); } if(ourChannel != null) { try { ... |
throw Util.notImplemented(); | if (isClosed()) { throw Util.noCurrentConnection(); } try { return getRealConnection().createBlob(); } catch (SQLException sqle) { notifyException(sqle); throw sqle; } | public Blob createBlob() throws SQLException { throw Util.notImplemented(); } |
throw Util.notImplemented(); | if (isClosed()) { throw Util.noCurrentConnection(); } try { return getRealConnection().createClob(); } catch (SQLException sqle) { notifyException(sqle); throw sqle; } | public Clob createClob() throws SQLException{ throw Util.notImplemented(); } |
throw Util.notImplemented(); | if (isClosed()) { throw Util.noCurrentConnection(); } try { return getRealConnection().createQueryObject(ifc); } catch (SQLException sqle) { notifyException(sqle); throw sqle; } | public <T extends BaseQuery>T createQueryObject(Class<T> ifc) throws SQLException { throw Util.notImplemented(); } |
public static TypeId getBuiltInTypeId(String SQLTypeName) { if (SQLTypeName.equals(TypeId.BOOLEAN_NAME)) { return TypeId.BOOLEAN_ID; } if (SQLTypeName.equals(TypeId.CHAR_NAME)) { return TypeId.CHAR_ID; } if (SQLTypeName.equals(TypeId.DATE_NAME)) { return getBuiltInTypeId(Types.DATE); } if (SQLTypeName.equals(TypeId.DO... | public static TypeId getBuiltInTypeId(int JDBCTypeId) { | public static TypeId getBuiltInTypeId(String SQLTypeName) { if (SQLTypeName.equals(TypeId.BOOLEAN_NAME)) { return TypeId.BOOLEAN_ID; } if (SQLTypeName.equals(TypeId.CHAR_NAME)) { return TypeId.CHAR_ID; } ... |
if (SQLTypeName.equals(TypeId.NCLOB_NAME)) { ret = NCLOB_ID; if (ret == null) ret = NCLOB_ID = new TypeId(StoredFormatIds.NCLOB_TYPE_ID, new BaseTypeIdImpl(StoredFormatIds.NCLOB_TYPE_ID_IMPL)); } else if (SQLTypeName.equals(TypeId.NATIONAL_CHAR_NAME)) { ret = NATIONAL_CHAR_ID; if (ret == null) ret = NATIONAL_CHAR_ID = ... | switch (JDBCTypeId) { case Types.TINYINT: ret = TINYINT_ID; if (ret == null) ret = TINYINT_ID = new TypeId(StoredFormatIds.TINYINT_TYPE_ID, new BaseTypeIdImpl(StoredFormatIds.TINYINT_TYPE_ID_IMPL)); break; | public static TypeId getBuiltInTypeId(String SQLTypeName) { if (SQLTypeName.equals(TypeId.BOOLEAN_NAME)) { return TypeId.BOOLEAN_ID; } if (SQLTypeName.equals(TypeId.CHAR_NAME)) { return TypeId.CHAR_ID; } ... |
} else if (SQLTypeName.equals(TypeId.NATIONAL_LONGVARCHAR_NAME)) { ret = NATIONAL_LONGVARCHAR_ID; if (ret == null) ret = NATIONAL_LONGVARCHAR_ID = new TypeId(StoredFormatIds.NATIONAL_LONGVARCHAR_TYPE_ID, new BaseTypeIdImpl(StoredFormatIds.NATIONAL_LONGVARCHAR_TYPE_ID_IMPL)); | case Types.SMALLINT: ret = SMALLINT_ID; if (ret == null) ret = SMALLINT_ID = new TypeId(StoredFormatIds.SMALLINT_TYPE_ID, new BaseTypeIdImpl(StoredFormatIds.SMALLINT_TYPE_ID_IMPL)); break; | public static TypeId getBuiltInTypeId(String SQLTypeName) { if (SQLTypeName.equals(TypeId.BOOLEAN_NAME)) { return TypeId.BOOLEAN_ID; } if (SQLTypeName.equals(TypeId.CHAR_NAME)) { return TypeId.CHAR_ID; } ... |
} else if (SQLTypeName.equals(TypeId.NATIONAL_VARCHAR_NAME)) { ret = NATIONAL_VARCHAR_ID; if (ret == null) ret = NATIONAL_VARCHAR_ID = new TypeId(StoredFormatIds.NATIONAL_VARCHAR_TYPE_ID, new BaseTypeIdImpl(StoredFormatIds.NATIONAL_VARCHAR_TYPE_ID_IMPL)); | case Types.INTEGER: return INTEGER_ID; | public static TypeId getBuiltInTypeId(String SQLTypeName) { if (SQLTypeName.equals(TypeId.BOOLEAN_NAME)) { return TypeId.BOOLEAN_ID; } if (SQLTypeName.equals(TypeId.CHAR_NAME)) { return TypeId.CHAR_ID; } ... |
} else if (SQLTypeName.equals(TypeId.REF_NAME)) { ret = REF_ID; if (ret == null) ret = REF_ID = new TypeId(StoredFormatIds.REF_TYPE_ID, new BaseTypeIdImpl(StoredFormatIds.REF_TYPE_ID_IMPL)); | case Types.BIGINT: ret = LONGINT_ID; if (ret == null) ret = LONGINT_ID = new TypeId(StoredFormatIds.LONGINT_TYPE_ID, new BaseTypeIdImpl(StoredFormatIds.LONGINT_TYPE_ID_IMPL)); break; case Types.REAL: ret = REAL_ID; if (ret == null) ret = REAL_ID = new TypeId(StoredFormatIds.REAL_TYPE_ID, new BaseTypeIdImpl(StoredForma... | public static TypeId getBuiltInTypeId(String SQLTypeName) { if (SQLTypeName.equals(TypeId.BOOLEAN_NAME)) { return TypeId.BOOLEAN_ID; } if (SQLTypeName.equals(TypeId.CHAR_NAME)) { return TypeId.CHAR_ID; } ... |
public String getSchemaName() | public String getSchemaName() throws StandardException | public String getSchemaName() { return null; } |
public CostEstimateImpl(double theCost, double theRowCount, double theSingleScanRowCount) { if (SanityManager.DEBUG) { if (theCost < 0.0 || theRowCount < 0.0 || theSingleScanRowCount < 0.0) { SanityManager.THROWASSERT( "All parameters expected to be < 0.0, " + "\n\ttheCost = " + theCost + "\n\ttheRowCount = " + theRowC... | public CostEstimateImpl() { | public CostEstimateImpl(double theCost, double theRowCount, double theSingleScanRowCount) { if (SanityManager.DEBUG) { if (theCost < 0.0 || theRowCount < 0.0 || theSingleScanRowCount < 0.0) { SanityManager.THROWASSERT( "All parameters expected to be < 0.0, " + "\n\ttheCost = " +... |
public void rememberAsBest(int planType) throws StandardException; | public void rememberAsBest(int planType, Optimizer optimizer) throws StandardException; | public void rememberAsBest(int planType) throws StandardException; |
columnReference.getFullColumnName()); | columnReference.getSQLColumnName()); | public ResultColumn bindColumnReference(ColumnReference columnReference) throws StandardException { boolean columnNameMatch = false; boolean tableNameMatch = false; FromTable fromTable; int currentLevel = -1; int previousLevel = -1; ResultColumn matchingRC = null; ResultColumn resultColumn; Strin... |
return new BlobClobTestSetup(new TestSuite(BlobTest.class, "BlobTest suite")); | TestSuite suite = new TestSuite("BlobTest suite"); suite.addTest(new BlobClobTestSetup( new TestSuite(BlobTest.class, "BlobTest:embedded"))); suite.addTest(TestConfiguration.clientServerDecorator( new BlobClobTestSetup(new TestSuite(BlobTest.class, "BlobTest:client")))); return suite; | public static Test suite() { return new BlobClobTestSetup(new TestSuite(BlobTest.class, "BlobTest suite")); } |
public static void debug(String key, String value) { | public static void debug(Exception e) { | public static void debug(String key, String value) { String msg = key; if (value != null) { msg = dblook.lookupMessage(key, new String [] {value}); } logFile.println("-- **--> DEBUG: " + msg); if (verbose) System.err.println("-- **--> DEBUG: " + msg); atLeastOneDebug = true; } |
String msg = key; if (value != null) { msg = dblook.lookupMessage(key, new String [] {value}); } logFile.println("-- **--> DEBUG: " + msg); | e.printStackTrace(logFile); | public static void debug(String key, String value) { String msg = key; if (value != null) { msg = dblook.lookupMessage(key, new String [] {value}); } logFile.println("-- **--> DEBUG: " + msg); if (verbose) System.err.println("-- **--> DEBUG: " + msg); atLeastOneDebug = true; } |
System.err.println("-- **--> DEBUG: " + msg); | e.printStackTrace(System.err); | public static void debug(String key, String value) { String msg = key; if (value != null) { msg = dblook.lookupMessage(key, new String [] {value}); } logFile.println("-- **--> DEBUG: " + msg); if (verbose) System.err.println("-- **--> DEBUG: " + msg); atLeastOneDebug = true; } |
Logs.reportMessage("CSLOOK_SchemasHeader"); | Logs.reportMessage("DBLOOK_SchemasHeader"); | public static void doSchemas(Connection conn, boolean tablesOnly) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT SCHEMANAME, SCHEMAID " + "FROM SYS.SYSSCHEMAS"); boolean firstTime = true; while (rs.next()) { String sName = dblook.addQuotes( dblook.ex... |
Logs.reportMessage("CSLOOK_JarsHeader"); Logs.reportMessage("CSLOOK_Jar_Note"); | Logs.reportMessage("DBLOOK_JarsHeader"); Logs.reportMessage("DBLOOK_Jar_Note"); | public static void doJars(String dbName, Connection conn) throws SQLException { String separator = System.getProperty("file.separator"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT FILENAME, SCHEMAID, " + "GENERATIONID FROM SYS.SYSFILES"); boolean firstTime = true; while (... |
Logs.debug("CSLOOK_FailedToLoadJar", | Logs.debug("DBLOOK_FailedToLoadJar", | public static void doJars(String dbName, Connection conn) throws SQLException { String separator = System.getProperty("file.separator"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT FILENAME, SCHEMAID, " + "GENERATIONID FROM SYS.SYSFILES"); boolean firstTime = true; while (... |
Logs.reportMessage("CSLOOK_TablesHeader"); | Logs.reportMessage("DBLOOK_TablesHeader"); | public static void doTables(Connection conn, HashMap tableIdToNameMap) throws SQLException { // Prepare some statements for general use by this class. getColumnInfoStmt = conn.prepareStatement("SELECT C.COLUMNNAME, C.REFERENCEID, " + "C.COLUMNNUMBER FROM SYS.SYSCOLUMNS C, SYS.SYSTABLES T WHERE T.TABLEID = ? " +... |
Logs.reportMessage("CSLOOK_IndexesHeader"); | Logs.reportMessage("DBLOOK_IndexesHeader"); | public static void doIndexes(Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT TABLEID, CONGLOMERATENAME, " + "DESCRIPTOR, SCHEMAID, ISINDEX, ISCONSTRAINT FROM SYS.SYSCONGLOMERATES " + "ORDER BY TABLEID"); boolean firstTime = true; while (... |
Logs.reportMessage("CSLOOK_ChecksHeader"); | Logs.reportMessage("DBLOOK_ChecksHeader"); | public static void doChecks(Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT CS.CONSTRAINTNAME, " + "CS.TABLEID, CS.SCHEMAID, CK.CHECKDEFINITION FROM SYS.SYSCONSTRAINTS CS, " + "SYS.SYSCHECKS CK WHERE CS.CONSTRAINTID = " + "CK.CONSTRAINTI... |
Logs.reportMessage("CSLOOK_ViewsHeader"); | Logs.reportMessage("DBLOOK_ViewsHeader"); | public static void doViews(Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT V.VIEWDEFINITION, " + "T.TABLENAME, T.SCHEMAID, V.COMPILATIONSCHEMAID FROM SYS.SYSVIEWS V, " + "SYS.SYSTABLES T WHERE T.TABLEID = V.TABLEID"); boolean firstTime = ... |
Logs.reportMessage("CSLOOK_DefaultSchema"); | Logs.reportMessage("DBLOOK_DefaultSchema"); | public static void doViews(Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT V.VIEWDEFINITION, " + "T.TABLENAME, T.SCHEMAID, V.COMPILATIONSCHEMAID FROM SYS.SYSVIEWS V, " + "SYS.SYSTABLES T WHERE T.TABLEID = V.TABLEID"); boolean firstTime = ... |
Logs.reportMessage("CSLOOK_TriggersHeader"); | Logs.reportMessage("DBLOOK_TriggersHeader"); | public static void doTriggers (Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT TRIGGERNAME, SCHEMAID, " + "EVENT, FIRINGTIME, TYPE, TABLEID, REFERENCEDCOLUMNS, " + "TRIGGERDEFINITION, REFERENCINGOLD, REFERENCINGNEW, OLDREFERENCINGNAME, " ... |
"CSLOOK_AtLeastOneDebug", null); | "DBLOOK_AtLeastOneDebug", null); | public static boolean cleanup() { try { if (atLeastOneDebug) dblook.writeVerboseOutput( "CSLOOK_AtLeastOneDebug", null); logFile.close(); if (ddlFile != null) ddlFile.close(); } catch (Exception e) { System.out.println("Error releasing resources: " + e); return false; } return true; } |
if ((isDerbyNet && writable == true) || (!isDerbyNet && writable == false)) | if (writable == true) | public static void main(String[] args) throws Throwable { isDerbyNet = TestUtil.isNetFramework(); Connection con; ResultSetMetaData met; ResultSet rs; Statement stmt; String[] columnNames = {"i", "s", "r", "d", "dt", "t", "ts", "c", "v", "dc", "bi", "cbd", "vbd", "lvbd", "cl", "bl"}; System.out.println(... |
public SQLBit(byte[] val) | public SQLBit() | public SQLBit(byte[] val) { dataValue = val; } |
dataValue = val; | public SQLBit(byte[] val) { dataValue = val; } | |
public AsciiStream(String materializedString, java.io.Reader reader) { reader_ = reader; materializedString_ = materializedString; } | public AsciiStream(String materializedString){ this(materializedString,new StringReader(materializedString)); } | public AsciiStream(String materializedString, java.io.Reader reader) { reader_ = reader; materializedString_ = materializedString; } |
public ClobWriter(Clob clob, long offset) throws SqlException { clob_ = clob; offset_ = offset; if (offset_ - 1 > clob_.sqlLength_) { throw new SqlException(clob_.agent_.logWriter_, "Invalid position: " + offset); } | public ClobWriter() { | public ClobWriter(Clob clob, long offset) throws SqlException { clob_ = clob; offset_ = offset; if (offset_ - 1 > clob_.sqlLength_) { throw new SqlException(clob_.agent_.logWriter_, "Invalid position: " + offset); } } |
ConnectionPoolDataSource cpds = getConnectionPoolDataSource(); | ConnectionPoolDataSource cpds = TestDataSourceFactory.getConnectionPoolDataSource(); | collectClassesFromConnectionPoolDataSource(Set<ClassInfo> classes) throws SQLException { ConnectionPoolDataSource cpds = getConnectionPoolDataSource(); addClass(classes, cpds.getClass(), javax.sql.ConnectionPoolDataSource.class); PooledConnection pc = cp... |
DataSource ds = getDataSource(); | DataSource ds = TestDataSourceFactory.getDataSource(); | private static void collectClassesFromDataSource(Set<ClassInfo> classes) throws SQLException { DataSource ds = getDataSource(); addClass(classes, ds.getClass(), javax.sql.DataSource.class); collectClassesFromConnection(ds.getConnection (CONFIG.getUs... |
XADataSource xads = getXADataSource(); | XADataSource xads = TestDataSourceFactory.getXADataSource(); | private static void collectClassesFromXADataSource(Set<ClassInfo> classes) throws SQLException { XADataSource xads = getXADataSource(); addClass(classes, xads.getClass(), javax.sql.XADataSource.class); XAConnection xaconn = xads.getXAConnection(CONFIG.getUserName(), ... |
System.out.println(""+(JDBC40Translation.FUNCTION_PARAMETER_UNKNOWN == DatabaseMetaData.functionParameterUnknown)); | private static void testDatabaseMetaDataMethods(Connection con) throws Exception { con.setAutoCommit(true); // make sure it is true Statement s = con.createStatement(); DatabaseMetaData met = con.getMetaData(); if (!met.supportsStoredFunctionsUsingCallSyntax()) { Sys... | |
if ( idString == null ) | if ( connString == null ) | public String toString() { if ( idString == null ) { idString = Integer.toString(connectionId); } return idString; } |
idString = Integer.toString(connectionId); } | String physicalConnString = isActive ? realConnection.toString() : "<none>"; connString = this.getClass().getName() + "@" + this.hashCode() + " " + "(ID = " + connectionId + "), " + "Physical Connection = " + physicalConnString; } | public String toString() { if ( idString == null ) { idString = Integer.toString(connectionId); } return idString; } |
return idString; | return connString; | public String toString() { if ( idString == null ) { idString = Integer.toString(connectionId); } return idString; } |
protected abstract void accumulate(DataValueDescriptor addend) throws StandardException; | public void accumulate(DataValueDescriptor addend, Object ga) throws StandardException { if ((addend == null) || addend.isNull()) { eliminatedNulls = true; return; } this.accumulate(addend); } | protected abstract void accumulate(DataValueDescriptor addend) throws StandardException; |
if (!TestUtil.isJCCFramework()) { int[] types = {ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE}; int[] conc = {ResultSet.CONCUR_READ_ONLY, ResultSet.CONCUR_UPDATABLE}; String[] typesStr = {"TYPE_FORWARD_ONLY", "TYPE_SCROLL_INSENSITIVE", "TYPE_SCROLL_SENSITIVE"}; Str... | public void runTest() { DatabaseMetaData met; ResultSet rs; ResultSetMetaData rsmet; System.out.println("Test metadata starting"); try { // test decimal type and other numeric types precision, scale, // and display width after operations, beetle 3875, 3906 s.execute("create table t (i int, s smallint, r re... | |
try { if (currentConnectionHandle != null) currentConnectionHandle.getIsolationUptoDate(); } catch (SQLException sqle) { throw wrapInXAException(sqle); } | public final synchronized void end(Xid xid, int flags) throws XAException { checkXAActive(); // ensure immtable and correct equals method. XAXactId xid_im = new XAXactId(xid); boolean endingCurrentXid = false; // must match the Xid from start() if (currentXid != null) { if (!currentXid.equals(xid_im)) throw... | |
currentConnectionHandle.getIsolationUptoDate(); | public final synchronized void start(Xid xid, int flags) throws XAException { checkXAActive(); // JDBC 3.0 section 12.3 - One transaction associated with a XAConnection if (currentXid != null) throw new XAException(XAException.XAER_PROTO); // ensure immtable and correct equals method. XAXactId xid_im = new XAXa... | |
public XAXactId(Xid xid) throws XAException | public XAXactId( int format_id, byte[] global_id, byte[] branch_id) | public XAXactId(Xid xid) throws XAException { if (xid == null) throw new XAException(XAException.XAER_NOTA); copy_init_xid( xid.getFormatId(), xid.getGlobalTransactionId(), xid.getBranchQualifier()); } |
if (xid == null) throw new XAException(XAException.XAER_NOTA); copy_init_xid( xid.getFormatId(), xid.getGlobalTransactionId(), xid.getBranchQualifier()); | copy_init_xid(format_id, global_id, branch_id); | public XAXactId(Xid xid) throws XAException { if (xid == null) throw new XAException(XAException.XAER_NOTA); copy_init_xid( xid.getFormatId(), xid.getGlobalTransactionId(), xid.getBranchQualifier()); } |
boolean end(EmbedXAConnection resource, int flags, boolean endingCurrentXid) throws XAException { | boolean end(EmbedXAResource resource, int flags, boolean endingCurrentXid) throws XAException { | boolean end(EmbedXAConnection resource, int flags, boolean endingCurrentXid) throws XAException { boolean rollbackOnly = false; synchronized (this) { boolean isSuspendedByResource = (suspendedList != null) && (suspendedList.get(resource) != null); if (!endingCurrentXid) { while (associationState == XATransact... |
XATransactionState(ContextManager cm, EmbedConnection conn, EmbedXAConnection resource, XAXactId xid) { | XATransactionState(ContextManager cm, EmbedConnection conn, EmbedXAResource resource, XAXactId xid) { | XATransactionState(ContextManager cm, EmbedConnection conn, EmbedXAConnection resource, XAXactId xid) { super(cm, "XATransactionState"); this.conn = conn; this.associatedResource = resource; this.creatingResource = resource; this.associationState = XATransactionState.T1_ASSOCIATED; this.xid = xid; } |
void start(EmbedXAConnection resource, int flags) throws XAException { | void start(EmbedXAResource resource, int flags) throws XAException { | void start(EmbedXAConnection resource, int flags) throws XAException { synchronized (this) { if (associationState == XATransactionState.TRO_FAIL) throw new XAException(rollbackOnlyCode); boolean isSuspendedByResource = (suspendedList != null) && (suspendedList.get(resource) != null); if (flags == XAResource.... |
XAStatementControl(EmbedXAConnection xaConnection, Statement realStatement) throws SQLException { this(xaConnection); this.realStatement = realStatement; this.applicationStatement = applicationConnection.newBrokeredStatement(this); | private XAStatementControl(EmbedPooledConnection xaConnection) { this.xaConnection = xaConnection; this.realConnection = xaConnection.realConnection; this.applicationConnection = xaConnection.currentConnectionHandle; | XAStatementControl(EmbedXAConnection xaConnection, Statement realStatement) throws SQLException { this(xaConnection); this.realStatement = realStatement; this.applicationStatement = applicationConnection.newBrokeredStatement(this); } |
throw new UnsupportedOperationException ( "addStatementEventListener(StatementEventListener listener)"); | if (!isActive) return; if (listener == null) return; statementEventListeners.addElement(listener); | public void addStatementEventListener(StatementEventListener listener) { throw new UnsupportedOperationException ( "addStatementEventListener(StatementEventListener listener)"); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.