rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
private void checkForNullPhysicalConnection() throws SQLException {
protected void checkForNullPhysicalConnection() throws SQLException {
private void checkForNullPhysicalConnection() throws SQLException { if (physicalConnection_ == null) { SqlException se = new SqlException(null, new ClientMessageId(SQLState.NO_CURRENT_CONNECTION)); throw se.getSQLException(); } }
public StepMeta newStep(String name, String description, boolean openit, boolean rename)
public StepMeta newStep()
public StepMeta newStep(String name, String description, boolean openit, boolean rename) { StepMeta inf = null; // See if we need to rename the step to avoid doubles! if (rename && transMeta.findStep(name)!=null) { int i=2; String newname = name+" "+i; ...
StepMeta inf = null; if (rename && transMeta.findStep(name)!=null) { int i=2; String newname = name+" "+i; while (transMeta.findStep(newname)!=null) { i++; newname = name+" "+i; } name=newname; } StepLoader steploader = StepLoader.getInstance(); StepPlugin stepPlugin = null; try { stepPlugin = steploader.findStepPl...
return newStep(true, true);
public StepMeta newStep(String name, String description, boolean openit, boolean rename) { StepMeta inf = null; // See if we need to rename the step to avoid doubles! if (rename && transMeta.findStep(name)!=null) { int i=2; String newname = name+" "+i; ...
buildDIAGLVL();
void buildACCRDB(String rdbnam, boolean readOnly, byte[] crrtkn, byte[] prddta, Typdef typdef) throws SqlException { createCommand(); markLengthBytes(CodePoint.ACCRDB); // the relational database name specifies the ...
Request(NetAgent netAgent, CcsidManager ccsidManager, int bufferSize) { this(netAgent, bufferSize, ccsidManager);
Request(NetAgent netAgent, int minSize, CcsidManager ccsidManager) { netAgent_ = netAgent; bytes_ = new byte[minSize]; ccsidManager_ = ccsidManager; clearBuffer();
Request(NetAgent netAgent, CcsidManager ccsidManager, int bufferSize) { //this (netAgent, Request.DEFAULT_BUFFER_SIZE, ccsidManager); this(netAgent, bufferSize, ccsidManager); }
final void writeScalarBytes(int codePoint, byte[] buff) { int buffLength = buff.length; ensureLength(offset_ + buffLength + 4); bytes_[offset_++] = (byte) (((buffLength + 4) >>> 8) & 0xff); bytes_[offset_++] = (byte) ((buffLength + 4) & 0xff);
final void writeScalarBytes(int codePoint, byte[] buf, int length) { ensureLength(offset_ + length + 4); bytes_[offset_++] = (byte) (((length + 4) >>> 8) & 0xff); bytes_[offset_++] = (byte) ((length + 4) & 0xff);
final void writeScalarBytes(int codePoint, byte[] buff) { int buffLength = buff.length; ensureLength(offset_ + buffLength + 4); bytes_[offset_++] = (byte) (((buffLength + 4) >>> 8) & 0xff); bytes_[offset_++] = (byte) ((buffLength + 4) & 0xff); bytes_[offset_++] = (byte) ((codePoin...
System.arraycopy(buff, 0, bytes_, offset_, buffLength); offset_ += buffLength;
for (int i = 0; i < length; i++) { bytes_[offset_++] = buf[i]; }
final void writeScalarBytes(int codePoint, byte[] buff) { int buffLength = buff.length; ensureLength(offset_ + buffLength + 4); bytes_[offset_++] = (byte) (((buffLength + 4) >>> 8) & 0xff); bytes_[offset_++] = (byte) ((buffLength + 4) & 0xff); bytes_[offset_++] = (byte) ((codePoin...
pushPList.pushExpressionsIntoSelect((SelectNode) childResult);
pushPList.pushExpressionsIntoSelect((SelectNode) childResult, false);
public void pushExpressions(PredicateList predicateList) throws StandardException { PredicateList pushPList = null; if (SanityManager.DEBUG) SanityManager.ASSERT(predicateList != null, "predicateList is expected to be non-null"); /* Push single table predicates down to the left of an outer * join, if ...
if (pushPList != null && (childResult instanceof UnionNode)) ((UnionNode)childResult).pushExpressions(pushPList);
public void pushExpressions(PredicateList predicateList) throws StandardException { PredicateList pushPList = null; if (SanityManager.DEBUG) SanityManager.ASSERT(predicateList != null, "predicateList is expected to be non-null"); /* Push single table predicates down to the left of an outer * join, if ...
public void rememberAsBest(int planType) throws StandardException
public void rememberAsBest(int planType, Optimizer optimizer) throws StandardException
public void rememberAsBest(int planType) throws StandardException { AccessPath bestPath = null; switch (planType) { case Optimizer.NORMAL_PLAN: bestPath = getBestAccessPath(); break; case Optimizer.SORT_AVOIDANCE_PLAN: bestPath = getBestSortAvoidancePath(); break; default: if (SanityManager.DEBUG...
addOrLoadBestPlanMapping(true, optimizer);
public void rememberAsBest(int planType) throws StandardException { AccessPath bestPath = null; switch (planType) { case Optimizer.NORMAL_PLAN: bestPath = getBestAccessPath(); break; case Optimizer.SORT_AVOIDANCE_PLAN: bestPath = getBestSortAvoidancePath(); break; default: if (SanityManager.DEBUG...
public Reader getCharacterStream(int parameterIndex)
public Reader getCharacterStream(String parameterName)
public Reader getCharacterStream(int parameterIndex) throws SQLException { throw SQLExceptionFactory.notImplemented("getCharacterStream(int)"); }
throw SQLExceptionFactory.notImplemented("getCharacterStream(int)");
throw SQLExceptionFactory.notImplemented("getCharacterStream(String)");
public Reader getCharacterStream(int parameterIndex) throws SQLException { throw SQLExceptionFactory.notImplemented("getCharacterStream(int)"); }
int type, int concurrency, int holdability) throws SqlException { super(agent, connection, sql, type, concurrency, holdability, java.sql.Statement.NO_GENERATED_KEYS, null);
int type, int concurrency, int holdability, ClientPooledConnection cpc) throws SqlException { super(agent, connection, sql, type, concurrency, holdability, java.sql.Statement.NO_GENERATED_KEYS, null,cpc);
public CallableStatement(Agent agent, Connection connection, String sql, int type, int concurrency, int holdability) throws SqlException { super(agent, connection, sql, type, concurrency, holdability, java.sql.Statement.NO_GE...
public Object run(){ if (folder.exists()) { } return new Boolean(folder.mkdirs()); }
public Object run() { return System.getProperties(); }
public Object run(){ if (folder.exists()) { // do something } return new Boolean(folder.mkdirs()); }
String userSuppliedOptimizerOverrides,
NoPutResultSet getBulkTableScanResultSet( long conglomId, int scociItem, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchO...
String userSuppliedOptimizerOverrides,
NoPutResultSet getDistinctScanResultSet( long conglomId, int scociItem, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, int hashKeyColumn, String tableName, String indexName, boolean isConstraint, int colRefItem, ...
String userSuppliedOptimizerOverrides,
public NoPutResultSet getHashJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, ...
String userSuppliedOptimizerOverrides,
public NoPutResultSet getHashLeftOuterJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod joinClause, int resultSetNumber, GeneratedMethod emptyRowF...
String userSuppliedOptimizerOverrides,
NoPutResultSet getHashScanResultSet( long conglomId, int scociItem, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperat...
String userSuppliedOptimizerOverrides,
NoPutResultSet getLastIndexKeyResultSet ( Activation activation, int resultSetNumber, GeneratedMethod resultRowAllocator, long conglomId, String tableName, String indexName, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimated...
String userSuppliedOptimizerOverrides,
public NoPutResultSet getNestedLoopJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, ...
String userSuppliedOptimizerOverrides,
public NoPutResultSet getNestedLoopLeftOuterJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod joinClause, int resultSetNumber, GeneratedMethod emp...
String userSuppliedOptimizerOverrides,
public NoPutResultSet getRaDependentTableScanResultSet( long conglomId, int scociItem, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, ...
String userSuppliedOptimizerOverrides,
NoPutResultSet getTableScanResultSet( long conglomId, int scociItem, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOpera...
jira614Test(conn);
public static void main (String args[]) { try { System.out.println("prepStmt Test Starts"); ij.getPropertyArg(args); conn = ij.startJBMS(); if (conn == null) { System.out.println("conn didn't work"); return; } PreparedStatement ps; ResultSet rs; boolean hasResultSet; int uc; // executeUp...
((ParameterNode) operand).setDescriptor(
operand.setType(
void bindParameter() throws StandardException { if (operatorType == XMLPARSE_OP) { // According to the SQL/XML standard, the XMLParse parameter // takes a string operand. RESOLVE: We use CLOB here because // an XML string can be arbitrarily long...is this okay? // The SQL/XML spec doesn't...
if (operand.isParameterNode())
if (operand.requiresTypeFromContext())
protected ValueNode bindUnaryOperator( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { /* ** Operand can be null for COUNT(*) which ** is treated like a normal aggregate. */ if (operand == null) { return this; } operand = operand.bindExpression(from...
throw new SqlException(agent_.logWriter_, "Invalid argument: " + "Statement auto-generated keys value " + autoGeneratedKeys + " is invalid.");
throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BAD_AUTO_GEN_KEY_VALUE), new Integer (autoGeneratedKeys));
void checkAutoGeneratedKeysParameters(int autoGeneratedKeys, String[] columnNames) throws SqlException { if (autoGeneratedKeys != java.sql.Statement.NO_GENERATED_KEYS && autoGeneratedKeys != java.sql.Statement.RETURN_GENERATED_KEYS) { throw new SqlException(agent_.logWriter_, "Inval...
throw new SqlException(agent_.logWriter_, "Driver not capable");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.NOT_IMPLEMENTED), "getAutoGeneratedKeys(columnNames == null)");
void checkAutoGeneratedKeysParameters(int autoGeneratedKeys, String[] columnNames) throws SqlException { if (autoGeneratedKeys != java.sql.Statement.NO_GENERATED_KEYS && autoGeneratedKeys != java.sql.Statement.RETURN_GENERATED_KEYS) { throw new SqlException(agent_.logWriter_, "Inval...
throw new SqlException(agent_.logWriter_, "invalid operation: connection closed");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.NO_CURRENT_CONNECTION));
protected void checkForClosedConnection() throws SqlException { if (!open_) { agent_.checkForDeferredExceptions(); throw new SqlException(agent_.logWriter_, "invalid operation: connection closed"); } else { agent_.checkForDeferredExceptions(); } }
"COMMIT or ROLLBACK invalid for application execution environment", SqlState._2D521, SqlCode.invalidCommitOrRollbackUnderXA);
new MessageId(SQLState.DRDA_INVALID_XA_STATE_ON_COMMIT_OR_ROLLBACK));
private void checkForInvalidXAStateOnCommitOrRollback() throws SqlException { if (! allowLocalCommitRollback_()) { throw new SqlException(agent_.logWriter_, "COMMIT or ROLLBACK invalid for application execution environment", SqlState._2D521, // Spec'ed by PROT...
"java.sql.Connection.close() requested while a transaction is in progress on the connection." + "The transaction remains active, and the connection cannot be closed.");
new MessageId (SQLState.CANNOT_CLOSE_ACTIVE_XA_CONNECTION));
void checkForTransactionInProgress() throws SqlException { // The following precondition matches CLI semantics, see SQLDisconnect() if (!autoCommit_ && inUnitOfWork_ && !allowCloseInUOW_()) { throw new SqlException(agent_.logWriter_, "java.sql.Connection.close() requested...
throw new SqlException(agent_.logWriter_, "Null SQL string passed.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.NULL_SQL_TEXT));
synchronized public String nativeSQLX(String sql) throws SqlException { checkForClosedConnection(); if (sql == null) { throw new SqlException(agent_.logWriter_, "Null SQL string passed."); } // Derby can handle the escape syntax directly so only needs escape // processi...
throw new SqlException(agent_.logWriter_, "Cannot release a null savepoint.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.XACT_SAVEPOINT_RELEASE_ROLLBACK_FAIL));
synchronized public void releaseSavepoint(java.sql.Savepoint savepoint) throws SQLException { try { int saveXaState = xaState_; if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "releaseSavepoint", savepoint); } checkForClosedC...
throw new SqlException(agent_.logWriter_, "Cannot release a savepoint when in auto-commit mode.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.NO_SAVEPOINT_ROLLBACK_OR_RELEASE_WHEN_AUTO));
synchronized public void releaseSavepoint(java.sql.Savepoint savepoint) throws SQLException { try { int saveXaState = xaState_; if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "releaseSavepoint", savepoint); } checkForClosedC...
throw new SqlException(agent_.logWriter_, "Cannot release a savepoint that was not created by this connection.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.SAVEPOINT_NOT_CREATED_BY_CONNECTION));
synchronized public void releaseSavepoint(java.sql.Savepoint savepoint) throws SQLException { try { int saveXaState = xaState_; if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "releaseSavepoint", savepoint); } checkForClosedC...
"setAutoCommit(true) invalid during global transaction", SqlState._2D521, SqlCode.invalidSetAutoCommitUnderXA);
new MessageId (SQLState.DRDA_NO_AUTOCOMMIT_UNDER_XA));
synchronized public void setAutoCommit(boolean autoCommit) throws SQLException { try { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setAutoCommit", autoCommit); } checkForClosedConnection(); if (! allowLocalCommitRollback...
throw new SqlException(agent_.logWriter_, "Cannot set savepoint when in auto-commit mode.");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.NO_SAVEPOINT_WHEN_AUTO));
synchronized public java.sql.Savepoint setSavepoint() throws SQLException { try { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setSavepoint"); } checkForClosedConnection(); if (autoCommit_) // Throw exception if auto-comm...
"Transaction isolation level " + level + " is an invalid argument for java.sql.Connection.setTransactionIsolation()." + " See Javadoc specification for a list of valid arguments.", "XJ045");
new MessageId (SQLState.UNIMPLEMENTED_ISOLATION_LEVEL), new Integer(level));
synchronized public void setTransactionIsolation(int level) throws SQLException { try { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setTransactionIsolation", level); } // Per jdbc spec (see java.sql.Connection.close() javadoc). ...
throw new SqlException(agent_.logWriter_, "Connection.setTypeMap is not supported");
throw new SqlException(agent_.logWriter_, new MessageId (SQLState.NOT_IMPLEMENTED), "setTypeMap");
synchronized public void setTypeMap(java.util.Map map) throws SQLException { try { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setTypeMap", map); } checkForClosedConnection(); throw new SqlException(agent_.logWriter_, "C...
public ResultColumnList getAllResultColumns(String allTableName)
public ResultColumnList getAllResultColumns(TableName allTableName)
public ResultColumnList getAllResultColumns(String allTableName) throws StandardException { return getResultColumnsForList(allTableName, resultColumns, tableName); }
while ((rcExpr != null) && (rcExpr instanceof ColumnReference))
while ((rcExpr != null) && (rc.isRedundant() || (rcExpr instanceof ColumnReference)))
protected ResultSetNode getSourceResultSet(int [] colNum) throws StandardException { if (source == null) { /* this can happen if column reference is pointing to a column * that is not from a base table. For example, if we have a * VALUES clause like * * (values (1, 2), (3, 4)) V1 (i, j) * * ...
colNum[0] = ((ColumnReference)rcExpr).getColumnNumber(); rc = ((ColumnReference)rcExpr).getSource();
if (rcExpr instanceof ColumnReference) { colNum[0] = ((ColumnReference)rcExpr).getColumnNumber(); rc = ((ColumnReference)rcExpr).getSource(); }
protected ResultSetNode getSourceResultSet(int [] colNum) throws StandardException { if (source == null) { /* this can happen if column reference is pointing to a column * that is not from a base table. For example, if we have a * VALUES clause like * * (values (1, 2), (3, 4)) V1 (i, j) * * ...
TestSuite connSuite = new TestSuite(ConnectionTest.class, "ConnectionTest suite"); if (usingDerbyNetClient()) { connSuite.addTest( clientSuite("ConnectionTest client-only suite")); } if (usingEmbedded()) { connSuite.addTest( embeddedSuite("ConnectionTest embedded-only suite")); }
TestSuite connSuite = new TestSuite("ConnectionTest suite"); TestSuite embedded = new TestSuite("ConnectionTest:embedded"); embedded.addTestSuite(ConnectionTest.class); embedded.addTest(embeddedSuite("ConnectionTest:embedded-only")); connSuite.addTest(embedded); TestSuite client = new TestSuite("ConnectionTest:client...
public static Test suite() { TestSuite connSuite = new TestSuite(ConnectionTest.class, "ConnectionTest suite"); // Add client only tests // NOTE: JCC is excluded if (usingDerbyNetClient()) { connSuite.addTest( clientSuite("ConnectionTest client-o...
return new BeanTag(beanType, name);
Method invokeMethod = (Method) invokeMethods.get(name); return new BeanTag(beanType, name, invokeMethod);
protected Tag createBeanTag(String name, Attributes attributes) throws JellyException { // is the name bound to a specific class Class beanType = getBeanType(name, attributes); if (beanType != null) { return new BeanTag(beanType, name); } // its a property tag ...
super(defaultClass); this.tagName = tagName; if (tagName.length() > 0) { addMethodName = "add" + tagName.substring(0,1).toUpperCase() + tagName.substring(1); }
this(defaultClass, tagName, null);
public BeanTag(Class defaultClass, String tagName) { super(defaultClass); this.tagName = tagName; if (tagName.length() > 0) { addMethodName = "add" + tagName.substring(0,1).toUpperCase() + tagName.substring(1); } }
case StoredFormatIds.TABLE_PERMISSION_FINDER_V01_ID: return Dependable.TABLE_PERMISSION; case StoredFormatIds.COLUMNS_PERMISSION_FINDER_V01_ID: return Dependable.COLUMNS_PERMISSION; case StoredFormatIds.ROUTINE_PERMISSION_FINDER_V01_ID: return Dependable.ROUTINE_PERMISSION;
public String getSQLObjectType() { switch (formatId) { case StoredFormatIds.ALIAS_DESCRIPTOR_FINDER_V01_ID: return Dependable.ALIAS; case StoredFormatIds.CONGLOMERATE_DESCRIPTOR_FINDER_V01_ID: return Dependable.CONGLOMERATE; case StoredFormatIds.CONSTRAINT_DESCRIPTOR_FINDER_V01_ID: return Dependable.C...
if (cdn.hasPrimaryKeyConstraint() || cdn.hasForeignKeyConstraint() || cdn.hasUniqueKeyConstraint()) { verifyUniqueColumnList(ddlStmt, cdn); if (cdn.hasPrimaryKeyConstraint() || cdn.hasUniqueKeyConstraint()) { setColumnListToNotNull(cdn, td); } }
if (cdn.hasPrimaryKeyConstraint()) { verifyUniqueColumnList(ddlStmt, cdn); if (td == null) { setColumnListToNotNull(cdn); } else { checkForNullColumns(cdn, td); } } else if (cdn.hasUniqueKeyConstraint()) { verifyUniqueColumnList(ddlStmt, cdn); checkForNullColumns(cdn, td); } else if (cdn.hasForeignKeyConstraint())...
void validate(DDLStatementNode ddlStmt, DataDictionary dd, TableDescriptor td) throws StandardException { this.td = td; int numAutoCols = 0; int size = size(); Hashtable columnHT = new Hashtable(size + 2, (float) .999); Hashtable constraintHT = new Hashtable(size + 2, (float) .999); //all t...
((OptimizerImpl)optimizer).prepForNextRound();
protected Optimizer getOptimizer( OptimizableList optList, OptimizablePredicateList predList, DataDictionary dataDictionary, RequiredRowOrdering requiredRowOrdering) throws StandardException { if (optimizer == null) { /* Get an optimizer. */ OptimizerFactory optimizerFactory = getLangua...
s.execute("create table ClobTestTable (sno int, clobCol CLOB(1M))"); s.execute("create table BlobTestTable (sno int, blobCol BLOB(1M))");
public void setUp() throws SQLException { conn = getConnection(); //Create the PreparedStatement that will then be used as the basis //throughout this test henceforth //This prepared statement will however NOT be used for testing //setClob and setBlob ps = conn.pre...
s.execute("drop table ClobTestTable"); s.execute("drop table BlobTestTable"); s.close();
public void tearDown() throws SQLException { if (conn != null && !conn.isClosed()) { conn.rollback(); conn.close(); } conn = null; }
Statement s = conn.createStatement(); s.execute("create table BlobTestTable (sno int, blobCol BLOB(1M))");
public void testSetBlob() throws SQLException { // Keeping the above in mind // STEP1: create the tables // Structure of table // -------------------------- // SNO Blob Column // -------------------------- Statement s = conn.createStatemen...
s.execute("drop table BlobTestTable");
public void testSetBlob() throws SQLException { // Keeping the above in mind // STEP1: create the tables // Structure of table // -------------------------- // SNO Blob Column // -------------------------- Statement s = conn.createStatemen...
Statement s = conn.createStatement(); s.execute("create table ClobTestTable (sno int, clobCol CLOB(1M))");
public void testSetClob() throws SQLException { // Keeping the above in mind // STEP1: create the tables // Structure of table // -------------------------- // SNO Clob Column // -------------------------- Statement s = conn.createStatemen...
s.execute("drop table ClobTestTable");
public void testSetClob() throws SQLException { // Keeping the above in mind // STEP1: create the tables // Structure of table // -------------------------- // SNO Clob Column // -------------------------- Statement s = conn.createStatemen...
public PartitionDatabaseMeta(String partitionId, String hostname, String port, String database)
public PartitionDatabaseMeta()
public PartitionDatabaseMeta(String partitionId, String hostname, String port, String database) { super(); this.partitionId = partitionId; this.hostname = hostname; this.port = port; this.databaseName = database; }
super(); this.partitionId = partitionId; this.hostname = hostname; this.port = port; this.databaseName = database;
public PartitionDatabaseMeta(String partitionId, String hostname, String port, String database) { super(); this.partitionId = partitionId; this.hostname = hostname; this.port = port; this.databaseName = database; }
ResourceAdapter.MODULE,
org.apache.derby.iapi.reference.Module.ResourceAdapter,
protected void bootResourceAdapter(boolean create, Properties startParams) { // Boot resource adapter - only if we are running Java 2 or // beyondwith JDBC20 extension, JTA and JNDI classes in the classpath // // assume if it doesn't boot it was because the required // classes were missing, and continue without i...
public static String mkQualifiedName(String[] ids)
public static String mkQualifiedName(String id1, String id2)
public static String mkQualifiedName(String[] ids) { StringBuffer sb = new StringBuffer(); for (int ix=0; ix < ids.length; ix++) { if (ix!=0) sb.append("."); sb.append(delimitId(ids[ix])); } return sb.toString(); }
StringBuffer sb = new StringBuffer(); for (int ix=0; ix < ids.length; ix++) { if (ix!=0) sb.append("."); sb.append(delimitId(ids[ix])); } return sb.toString();
if( null == id1) return delimitId(id2); return delimitId(id1) + "." + delimitId(id2);
public static String mkQualifiedName(String[] ids) { StringBuffer sb = new StringBuffer(); for (int ix=0; ix < ids.length; ix++) { if (ix!=0) sb.append("."); sb.append(delimitId(ids[ix])); } return sb.toString(); }
int count; if(( count = reader.read(decodedBuffer_, 0, BUFFERED_CHAR_LEN )) < 1 ){ return null; }
int count; do{ count = reader.read(decodedBuffer_, 0, BUFFERED_CHAR_LEN); }while(count == 0); if(count < 0) return null;
private ByteArrayInputStream reEncode(Reader reader) throws IOException { int count; if(( count = reader.read(decodedBuffer_, 0, BUFFERED_CHAR_LEN )) < 1 ){ return null; } encodedOutputStream_.reset(); encodedStreamWriter_.write(decodedBuffer_,0,count); encodedStreamWriter_.flush(); int encodedLength = en...
public static final String getAliasType(char nameSpace)
public char getAliasType()
public static final String getAliasType(char nameSpace) { switch (nameSpace) { case AliasInfo.ALIAS_TYPE_PROCEDURE_AS_CHAR: return "PROCEDURE"; case AliasInfo.ALIAS_TYPE_FUNCTION_AS_CHAR: return "FUNCTION"; case AliasInfo.ALIAS_TYPE_SYNONYM_AS_CHAR: return "SYNONYM"; } return null; }
switch (nameSpace) { case AliasInfo.ALIAS_TYPE_PROCEDURE_AS_CHAR: return "PROCEDURE"; case AliasInfo.ALIAS_TYPE_FUNCTION_AS_CHAR: return "FUNCTION"; case AliasInfo.ALIAS_TYPE_SYNONYM_AS_CHAR: return "SYNONYM"; } return null;
return aliasType;
public static final String getAliasType(char nameSpace) { switch (nameSpace) { case AliasInfo.ALIAS_TYPE_PROCEDURE_AS_CHAR: return "PROCEDURE"; case AliasInfo.ALIAS_TYPE_FUNCTION_AS_CHAR: return "FUNCTION"; case AliasInfo.ALIAS_TYPE_SYNONYM_AS_CHAR: return "SYNONYM"; } return null; }
return getPrecision(column) + 2;
int scale = getScale(column); int precision = getPrecision(column); return (scale == 0) ? (precision + 1) : ((scale == precision) ? (precision + 3) : (precision + 2));
public int getColumnDisplaySize(int column) throws SQLException { try { checkForClosedStatement(); checkForValidColumnIndex(column); int jdbcType = types_[column - 1]; switch (jdbcType) { case Types.BOOLEAN: return 5; cas...
public void addRemovePermissionsDescriptor( boolean add,
public boolean addRemovePermissionsDescriptor( boolean add,
public void addRemovePermissionsDescriptor( boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException { // It is p...
int catalogNumber = perm.getCatalogNumber();
public void addRemovePermissionsDescriptor( boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException { // It is p...
int catalogNumber = perm.getCatalogNumber();
perm.setUUID(null);
public void addRemovePermissionsDescriptor( boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException { // It is p...
return;
return false;
public void addRemovePermissionsDescriptor( boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException { // It is p...
if (!add) { rf.setUUIDOfThePassedDescriptor(existingRow, perm); }
public void addRemovePermissionsDescriptor( boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException { // It is p...
perm.setUUID(null); return;
return false;
public void addRemovePermissionsDescriptor( boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException { // It is p...
perm.setUUID(null);
if (add) return false; return true;
public void addRemovePermissionsDescriptor( boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException { // It is p...
return Double.parseDouble(getString());
return NumberDataType.normalizeDOUBLE(Double.parseDouble(getString()));
public double getDouble() throws StandardException { if (isNull()) return 0.0; return Double.parseDouble(getString()); // TODO - correct implementation }
return Float.parseFloat(getString());
return NumberDataType.normalizeREAL(Float.parseFloat(getString()));
public float getFloat() throws StandardException { if (isNull()) return 0.0f; return Float.parseFloat(getString()); // TODO - correct implementation }
" PROPERTIES insertMode=bulkInsert " +
" --DERBY-PROPERTIES insertMode=bulkInsert \n" +
public static void SYSCS_BULK_INSERT( String schemaName, String tableName, String vtiName, String vtiArg ) throws SQLException { Connection conn = getDefaultConn(); String entityName = (schemaName == null ? tableName : schemaName + "." + tableName); String binsertSql = "insert into " + ent...
clientMessageIds.add(SQLState.NOT_IMPLEMENTED);
static void initClientMessageIds() { // Add message ids that don't start with XJ here clientMessageIds.add(SQLState.NO_CURRENT_CONNECTION); }
boolean forUpdate, GeneratedMethod c) throws StandardException
boolean forUpdate) throws StandardException
public NormalizeResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, int erdNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean forUpdate, GeneratedMethod c) throws StandardException { super(activation, resultSet...
closeCleanup = c;
public NormalizeResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, int erdNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean forUpdate, GeneratedMethod c) throws StandardException { super(activation, resultSet...
if (closeCleanup != null) { closeCleanup.invoke(activation); }
public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if ( isOpen ) { if (closeCleanup != null) { closeCleanup.invoke(activation); // let activation tidy up } currentRow = null; source.close(); super.close(); } else if (SanityManager.DEBUG) SanityManag...
public int addConstant(int value) { return addDirectEntry(new CONSTANT_Integer_info(value));
public int addConstant(String value) { return addString(value);
public int addConstant(int value) { return addDirectEntry(new CONSTANT_Integer_info(value)); }
t_getRowId1(); t_getRowId2(); t_updateRowId1(); t_updateRowId2();
void startTestResultSetMethods(Connection conn_in,PreparedStatement ps_in,ResultSet rs_in) { conn = conn_in; ps = ps_in; rs = rs_in; t_getRowId1(); t_getRowId2(); t_updateRowId1(); t_updateRowId2(); t_getHoldability(); t_isClosed...
public IndexRowToBaseRowResultSet(
IndexRowToBaseRowResultSet(
public IndexRowToBaseRowResultSet( long conglomId, int scociItem, Activation a, NoPutResultSet source, GeneratedMethod resultRowAllocator, int resultSetNumber, String indexName, int heapColRefItem, int indexColRefItem, int indexColMapItem, GeneratedMethod restriction, ...
double optimizerEstimatedCost, GeneratedMethod closeCleanup)
double optimizerEstimatedCost)
public IndexRowToBaseRowResultSet( long conglomId, int scociItem, Activation a, NoPutResultSet source, GeneratedMethod resultRowAllocator, int resultSetNumber, String indexName, int heapColRefItem, int indexColRefItem, int indexColMapItem, GeneratedMethod restriction, ...
this.closeCleanup = closeCleanup;
public IndexRowToBaseRowResultSet( long conglomId, int scociItem, Activation a, NoPutResultSet source, GeneratedMethod resultRowAllocator, int resultSetNumber, String indexName, int heapColRefItem, int indexColRefItem, int indexColMapItem, GeneratedMethod restriction, ...
if (closeCleanup != null) { closeCleanup.invoke(activation); } currentRow = null;
public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if ( isOpen ) { // we don't want to keep around a pointer to the // row ... so it can be thrown away. // REVISIT: does this need to be in a finally // block, to ensure that it is executed? clearCurrentRow(); if (clos...
currentRow = null;
public ExecRow getCurrentRow() throws StandardException { ExecRow sourceRow = null; if (SanityManager.DEBUG) { SanityManager.ASSERT(isOpen, "IndexRowToBaseRowResultSet is expected to be open"); } if (currentRowPrescanned) return currentRow; /* Nothing to do if we're not currently on a row */ if (curre...
currentRow = null;
public ExecRow getNextRowCore() throws StandardException { ExecRow sourceRow = null; ExecRow retval = null; boolean restrict = false; DataValueDescriptor restrictBoolean; long beginRT = 0; beginTime = getCurrentTimeMillis(); if ( ! isOpen ) { throw StandardException.newException(SQLState.LANG_RESU...
Logs.reportMessage("CSLOOK_Header", "views");
Logs.reportMessage("CSLOOK_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 = ...
jira428Test(conn);
public static void main (String args[]) { try { System.out.println("prepStmt Test Starts"); ij.getPropertyArg(args); conn = ij.startJBMS(); if (conn == null) { System.out.println("conn didn't work"); return; } Statement cleanstmt = conn.createStatement(); TestUtil.cleanUpTest(cleanstmt, testO...
private static boolean haveClass(String className)
protected static boolean haveClass(String className)
private static boolean haveClass(String className) { try { Class.forName(className); return true; } catch (Exception e) { return false; } }
source.updateRow(newBaseRow);
public boolean collectAffectedRows() throws StandardException { boolean rowsFound = false; row = getNextRowCore(source); if (row!=null) rowsFound = true; else { activation.addWarning( StandardException.newWarning( SQLState.LANG_NO_ROW_FOUND)); } //beetle 3865, update cursor use index. TableScanR...
source.updateRow(newBaseRow);
void updateDeferredRows() throws StandardException { if (deferred) { // we already have everything locked deferredBaseCC = tc.openCompiledConglomerate( false, tc.OPENMODE_FORUPDATE|tc.OPENMODE_SECONDARY_LOCKED, lockMode, ...
if (currentRow == null)
if (currentRow == null || scanRepositioned)
public ExecRow getNextRowCore() throws StandardException { checkCancellationFlag(); if (currentRow == null) { currentRow = getCompactRow(candidate, accessedCols, (FormatableBitSet) null, isKeyed); } beginTime = getCurrentTimeMillis(); ExecRow result = null; /* beetle 3865, updateable curs...
currentRowIsValid = true; scanRepositioned = false; qualify = true;
public ExecRow getNextRowCore() throws StandardException { checkCancellationFlag(); if (currentRow == null) { currentRow = getCompactRow(candidate, accessedCols, (FormatableBitSet) null, isKeyed); } beginTime = getCurrentTimeMillis(); ExecRow result = null; /* beetle 3865, updateable curs...
tableProperties);
tableProperties, null);
public void init( Object leftResult, Object rightResult, Object onClause, Object usingClause, Object rightOuterJoin, Object tableProperties) throws StandardException { super.init( leftResult, rightResult, onClause, usingClause, null, tableProperties); this.right...
null,
public FromTable transformOuterJoins(ValueNode predicateTree, int numTables) throws StandardException { ResultSetNode innerRS; if (predicateTree == null) { /* We can't transform this node, so tell both sides of the * outer join that they can't get flattened into outer query block. */ leftResultSet.notFl...
public void addParms(Vector parameterList) throws StandardException
public void addParms(JavaValueNode[] methodParms)
public void addParms(Vector parameterList) throws StandardException { methodParms = new JavaValueNode[parameterList.size()]; int plSize = parameterList.size(); for (int index = 0; index < plSize; index++) { QueryTreeNode qt; qt = (QueryTreeNode) parameterList.elementAt(index); /* ** If the parameter is a S...
methodParms = new JavaValueNode[parameterList.size()]; int plSize = parameterList.size(); for (int index = 0; index < plSize; index++) { QueryTreeNode qt; qt = (QueryTreeNode) parameterList.elementAt(index); if ( ! (qt instanceof JavaValueNode)) { if (qt instanceof JavaToSQLValueNode) { qt = ((JavaToSQLValueNode)...
this.methodParms = methodParms;
public void addParms(Vector parameterList) throws StandardException { methodParms = new JavaValueNode[parameterList.size()]; int plSize = parameterList.size(); for (int index = 0; index < plSize; index++) { QueryTreeNode qt; qt = (QueryTreeNode) parameterList.elementAt(index); /* ** If the parameter is a S...
this.operator = (String) operator; this.methodName = (String) methodName;
public void init( Object leftOperand, Object rightOperand, Object leftInterfaceType, Object rightInterfaceType) { this.leftOperand = (ValueNode) leftOperand; this.rightOperand = (ValueNode) rightOperand; this.leftInterfaceType = (String) leftInterfaceType; this.rightInterfaceType = (String) rightInterfaceT...
closeMethodArgument(acb, mb);
private void generateDistinctScan ( ExpressionClassBuilder acb, MethodBuilder mb ) throws StandardException { ConglomerateDescriptor cd = getTrulyTheBestAccessPath().getConglomerateDescriptor(); CostEstimate costEstimate = getFinalCostEstimate(); int colRefItem = (referencedCols == null) ? -1 : acb.addI...