rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
System.setProperty("database", databaseName + ";create=true"); Connection conn = util.startJBMS();
Connection conn = TestUtil.getConnection(databaseName, "create=true");
private static Connection openConnectionToNewDatabase(String databaseName) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException { System.setProperty("database", databaseName + ";create=true"); Connection conn = util.startJBMS(); System.out.println("A connection to...
throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException {
throws SQLException {
private static Connection reopenConnectionToDatabase(String databaseName) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException { System.setProperty("database", databaseName); return util.startJBMS(); }
System.setProperty("database", databaseName); return util.startJBMS();
return TestUtil.getConnection(databaseName, null);
private static Connection reopenConnectionToDatabase(String databaseName) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException { System.setProperty("database", databaseName); return util.startJBMS(); }
System.setProperty("database", databaseName + ";shutdown=true");
TestUtil.getConnection(databaseName, "shutdown=true");
private static void shutdownDatabase(String databaseName) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException { System.setProperty("database", databaseName + ";shutdown=true"); util.startJBMS(); System.out.println(databaseName + " was shutted down."); }
util.startJBMS(); System.out.println(databaseName + " was shutted down.");
System.out.println(databaseName + " was shut down.");
private static void shutdownDatabase(String databaseName) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException { System.setProperty("database", databaseName + ";shutdown=true"); util.startJBMS(); System.out.println(databaseName + " was shutted down."); }
key = requestKey();
public void setUp() throws SQLException { //create the statement object s = createStatement(); //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 //setCl...
s.execute("create table ClobTestTable (sno int, clobCol CLOB(1M))"); s.execute("create table BlobTestTable (sno int, blobCol BLOB(1M))");
psFetchBlob = prepareStatement("SELECT dBlob FROM " + BLOBTBL + " WHERE sno = ?"); psInsertBlob = prepareStatement("INSERT INTO " + BLOBTBL + " VALUES (?, ?)"); psFetchClob = prepareStatement("SELECT dClob FROM " + CLOBTBL + " WHERE sno = ?"); psInsertClob = prepareStatement("INSERT INTO " + CLOBTBL + " VALUES (?, ?)")...
public void setUp() throws SQLException { //create the statement object s = createStatement(); //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 //setCl...
return suite;
return new BaseJDBCTestSetup(suite) { public void setUp() throws java.lang.Exception { try { create(); } catch (SQLException sqle) { if (sqle.getSQLState().equals("X0Y32")) { drop(); create(); } else { throw sqle; } } } public void tearDown() throws java.lang.Exception { drop(); super.tearDown(); } private void creat...
public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(PreparedStatementTest.class); suite.addTest(SetObjectUnsupportedTest.suite(false)); return suite; }
s.execute("drop table ClobTestTable"); s.execute("drop table BlobTestTable"); s.close();
psFetchBlob.close(); psFetchClob.close(); psInsertBlob.close(); psInsertClob.close(); psInsertLongVarchar.close();
public void tearDown() throws Exception { s.execute("drop table ClobTestTable"); s.execute("drop table BlobTestTable"); s.close(); super.tearDown(); }
PreparedStatement ps_sb = prepareStatement("insert into ClobTestTable values(?,?)");
public void testSetAsciiStream() throws Exception { //insert default values into the table byte [] bytes1 = new byte[10]; InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into C...
ps_sb.setInt(1,1); ps_sb.setAsciiStream(2,is,BYTES.length); ps_sb.executeUpdate();
psInsertClob.setInt(1, key); psInsertClob.setAsciiStream(2, is, BYTES.length); psInsertClob.executeUpdate();
public void testSetAsciiStream() throws Exception { //insert default values into the table byte [] bytes1 = new byte[10]; InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into C...
ResultSet rs = s.executeQuery("select * from ClobTestTable where sno = 1");
psFetchClob.setInt(1, key); ResultSet rs = psFetchClob.executeQuery();
public void testSetAsciiStream() throws Exception { //insert default values into the table byte [] bytes1 = new byte[10]; InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into C...
Clob ClobRetrieved = rs.getClob(2);
Clob ClobRetrieved = rs.getClob(1);
public void testSetAsciiStream() throws Exception { //insert default values into the table byte [] bytes1 = new byte[10]; InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into C...
ps_sb.close();
psInsertClob.close();
public void testSetAsciiStream() throws Exception { //insert default values into the table byte [] bytes1 = new byte[10]; InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into C...
PreparedStatement psAscii = prepareStatement( "insert into ClobTestTable values (?,?)"); psAscii.setInt(1, 1); psAscii.setAsciiStream(2, is); psAscii.execute();
psInsertClob.setInt(1, key); psInsertClob.setAsciiStream(2, is); psInsertClob.execute();
public void testSetAsciiStreamLengthless() throws IOException, SQLException { // Insert test data. InputStream is = new ByteArrayInputStream(BYTES); PreparedStatement psAscii = prepareStatement( "insert into ClobTestTable values (?,?)"); psAscii.setInt(1, 1); ...
ResultSet rs = s.executeQuery( "select clobCol from ClobTestTable where sno = 1");
psFetchClob.setInt(1, key); ResultSet rs = psFetchClob.executeQuery();
public void testSetAsciiStreamLengthless() throws IOException, SQLException { // Insert test data. InputStream is = new ByteArrayInputStream(BYTES); PreparedStatement psAscii = prepareStatement( "insert into ClobTestTable values (?,?)"); psAscii.setInt(1, 1); ...
psAscii.close();
psInsertClob.close();
public void testSetAsciiStreamLengthless() throws IOException, SQLException { // Insert test data. InputStream is = new ByteArrayInputStream(BYTES); PreparedStatement psAscii = prepareStatement( "insert into ClobTestTable values (?,?)"); psAscii.setInt(1, 1); ...
PreparedStatement ps_sb = prepareStatement("insert into BlobTestTable values(?,?)");
public void testSetBinaryStream() throws Exception { //insert default values into the table byte [] bytes1 = new byte[10]; InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into ...
ps_sb.setInt(1,1); ps_sb.setBinaryStream(2,is,BYTES.length); ps_sb.executeUpdate();
psInsertBlob.setInt(1, key); psInsertBlob.setBinaryStream(2, is, BYTES.length); psInsertBlob.executeUpdate();
public void testSetBinaryStream() throws Exception { //insert default values into the table byte [] bytes1 = new byte[10]; InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into ...
ResultSet rs = s.executeQuery("select * from BlobTestTable where sno = 1");
psFetchBlob.setInt(1, key); ResultSet rs = psFetchBlob.executeQuery();
public void testSetBinaryStream() throws Exception { //insert default values into the table byte [] bytes1 = new byte[10]; InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into ...
Blob blobRetrieved = rs.getBlob(2);
Blob blobRetrieved = rs.getBlob(1);
public void testSetBinaryStream() throws Exception { //insert default values into the table byte [] bytes1 = new byte[10]; InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into ...
ps_sb.close();
psInsertBlob.close();
public void testSetBinaryStream() throws Exception { //insert default values into the table byte [] bytes1 = new byte[10]; InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into ...
PreparedStatement psBinary = prepareStatement( "insert into BlobTestTable values (?,?)"); psBinary.setInt(1, 1); psBinary.setBinaryStream(2, is); psBinary.execute();
psInsertBlob.setInt(1, key); psInsertBlob.setBinaryStream(2, is); psInsertBlob.execute();
public void testSetBinaryStreamLengthless() throws IOException, SQLException { // Insert test data. InputStream is = new ByteArrayInputStream(BYTES); PreparedStatement psBinary = prepareStatement( "insert into BlobTestTable values (?,?)"); psBinary.setInt(1, 1);...
ResultSet rs = s.executeQuery( "select blobCol from BlobTestTable where sno = 1");
psFetchBlob.setInt(1, key); ResultSet rs = psFetchBlob.executeQuery();
public void testSetBinaryStreamLengthless() throws IOException, SQLException { // Insert test data. InputStream is = new ByteArrayInputStream(BYTES); PreparedStatement psBinary = prepareStatement( "insert into BlobTestTable values (?,?)"); psBinary.setInt(1, 1);...
psBinary.close();
psInsertBlob.close();
public void testSetBinaryStreamLengthless() throws IOException, SQLException { // Insert test data. InputStream is = new ByteArrayInputStream(BYTES); PreparedStatement psBinary = prepareStatement( "insert into BlobTestTable values (?,?)"); psBinary.setInt(1, 1);...
PreparedStatement ps_sb = prepareStatement("insert into BlobTestTable values(?,?)");
public void testSetBlob() throws IOException, SQLException { //insert default values into the table InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into BlobTestTable values(?,?)"); ...
ps_sb.setInt(1,1); ps_sb.setBlob(2,is,BYTES.length); ps_sb.executeUpdate();
psInsertBlob.setInt(1, key); psInsertBlob.setBlob(2, is, BYTES.length); psInsertBlob.executeUpdate();
public void testSetBlob() throws IOException, SQLException { //insert default values into the table InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into BlobTestTable values(?,?)"); ...
ResultSet rs = s.executeQuery("select * from BlobTestTable where sno = 1");
psFetchBlob.setInt(1, key); ResultSet rs = psFetchBlob.executeQuery();
public void testSetBlob() throws IOException, SQLException { //insert default values into the table InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into BlobTestTable values(?,?)"); ...
Blob blobToBeInserted = rs.getBlob(2);
Blob blobToBeInserted = rs.getBlob(1);
public void testSetBlob() throws IOException, SQLException { //insert default values into the table InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into BlobTestTable values(?,?)"); ...
ps_sb.setInt(1,2); ps_sb.setBlob(2,blobToBeInserted); ps_sb.execute();
int secondKey = requestKey(); psInsertBlob.setInt(1, secondKey); psInsertBlob.setBlob(2, blobToBeInserted); psInsertBlob.execute();
public void testSetBlob() throws IOException, SQLException { //insert default values into the table InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into BlobTestTable values(?,?)"); ...
ps_sb.close();
psInsertBlob.close();
public void testSetBlob() throws IOException, SQLException { //insert default values into the table InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into BlobTestTable values(?,?)"); ...
rs = s.executeQuery("select * from BlobTestTable where sno = 2");
psFetchBlob.setInt(1, secondKey); rs = psFetchBlob.executeQuery();
public void testSetBlob() throws IOException, SQLException { //insert default values into the table InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into BlobTestTable values(?,?)"); ...
Blob blobRetrieved = rs.getBlob(2);
Blob blobRetrieved = rs.getBlob(1);
public void testSetBlob() throws IOException, SQLException { //insert default values into the table InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); PreparedStatement ps_sb = prepareStatement("insert into BlobTestTable values(?,?)"); ...
PreparedStatement psByte = prepareStatement( "insert into BlobTestTable values (?,?)"); psByte.setInt(1, 1); psByte.setBinaryStream(2, is); psByte.execute();
psInsertBlob.setInt(1, key); psInsertBlob.setBinaryStream(2, is); psInsertBlob.execute();
public void testSetBlobLengthless() throws IOException, SQLException { // Insert test data. InputStream is = new ByteArrayInputStream(BYTES); PreparedStatement psByte = prepareStatement( "insert into BlobTestTable values (?,?)"); psByte.setInt(1, 1); psBy...
ResultSet rs = s.executeQuery( "select blobCol from BlobTestTable where sno = 1");
psFetchBlob.setInt(1, key); ResultSet rs = psFetchBlob.executeQuery();
public void testSetBlobLengthless() throws IOException, SQLException { // Insert test data. InputStream is = new ByteArrayInputStream(BYTES); PreparedStatement psByte = prepareStatement( "insert into BlobTestTable values (?,?)"); psByte.setInt(1, 1); psBy...
psByte.setInt(1, 2); psByte.setBlob(2, insertBlob); psByte.execute();
int secondKey = requestKey(); psInsertBlob.setInt(1, secondKey); psInsertBlob.setBlob(2, insertBlob); psInsertBlob.execute();
public void testSetBlobLengthless() throws IOException, SQLException { // Insert test data. InputStream is = new ByteArrayInputStream(BYTES); PreparedStatement psByte = prepareStatement( "insert into BlobTestTable values (?,?)"); psByte.setInt(1, 1); psBy...
rs = s.executeQuery( "select blobCol from BlobTestTable where sno = 2");
psFetchBlob.setInt(1, secondKey); rs = psFetchBlob.executeQuery();
public void testSetBlobLengthless() throws IOException, SQLException { // Insert test data. InputStream is = new ByteArrayInputStream(BYTES); PreparedStatement psByte = prepareStatement( "insert into BlobTestTable values (?,?)"); psByte.setInt(1, 1); psBy...
PreparedStatement ps_sc = prepareStatement("insert into ClobTestTable values(?,?)");
public void testSetCharacterStream() throws Exception { String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = prepareStatement("insert into ClobTestTable values(?,?)"); ...
ps_sc.setInt(1,1); ps_sc.setCharacterStream(2,is,str.length()); ps_sc.executeUpdate();
psInsertClob.setInt(1, key); psInsertClob.setCharacterStream(2, is, str.length()); psInsertClob.executeUpdate();
public void testSetCharacterStream() throws Exception { String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = prepareStatement("insert into ClobTestTable values(?,?)"); ...
ResultSet rs = s.executeQuery("select * from ClobTestTable where sno = 1");
psFetchClob.setInt(1, key); ResultSet rs = psFetchClob.executeQuery();
public void testSetCharacterStream() throws Exception { String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = prepareStatement("insert into ClobTestTable values(?,?)"); ...
Clob clobRetrieved = rs.getClob(2);
Clob clobRetrieved = rs.getClob(1);
public void testSetCharacterStream() throws Exception { String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = prepareStatement("insert into ClobTestTable values(?,?)"); ...
ps_sc.close();
psInsertClob.close();
public void testSetCharacterStream() throws Exception { String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = prepareStatement("insert into ClobTestTable values(?,?)"); ...
PreparedStatement psChar = prepareStatement( "insert into ClobTestTable values (?,?)"); psChar.setInt(1, 1); psChar.setCharacterStream(2, reader); psChar.execute();
psInsertClob.setInt(1, key); psInsertClob.setCharacterStream(2, reader); psInsertClob.execute();
public void testSetCharacterStreamLengthless() throws IOException, SQLException { // Insert test data. String testString = "Test string for setCharacterStream\u1A00"; Reader reader = new StringReader(testString); PreparedStatement psChar = prepareStatement( "ins...
ResultSet rs = s.executeQuery( "select clobCol from ClobTestTable where sno = 1");
psFetchClob.setInt(1, key); ResultSet rs = psFetchClob.executeQuery();
public void testSetCharacterStreamLengthless() throws IOException, SQLException { // Insert test data. String testString = "Test string for setCharacterStream\u1A00"; Reader reader = new StringReader(testString); PreparedStatement psChar = prepareStatement( "ins...
PreparedStatement ps_sc = prepareStatement("insert into ClobTestTable values(?,?)");
public void testSetClob() throws IOException, SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = p...
ps_sc.setInt(1,1); ps_sc.setClob(2,is,str.length()); ps_sc.executeUpdate();
psInsertClob.setInt(1, key); psInsertClob.setClob(2, is, str.length()); psInsertClob.executeUpdate();
public void testSetClob() throws IOException, SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = p...
ResultSet rs = s.executeQuery("select * from ClobTestTable where sno = 1");
psFetchClob.setInt(1, key); ResultSet rs = psFetchClob.executeQuery();
public void testSetClob() throws IOException, SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = p...
Clob clobToBeInserted = rs.getClob(2);
Clob clobToBeInserted = rs.getClob(1);
public void testSetClob() throws IOException, SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = p...
ps_sc.setInt(1,2); ps_sc.setClob(2,clobToBeInserted); ps_sc.execute();
int secondKey = requestKey(); psInsertClob.setInt(1, secondKey); psInsertClob.setClob(2, clobToBeInserted); psInsertClob.execute();
public void testSetClob() throws IOException, SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = p...
ps_sc.close();
psInsertClob.close();
public void testSetClob() throws IOException, SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = p...
rs = s.executeQuery("select * from ClobTestTable where sno = 2");
psFetchClob.setInt(1, secondKey); rs = psFetchClob.executeQuery();
public void testSetClob() throws IOException, SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = p...
Clob clobRetrieved = rs.getClob(2);
Clob clobRetrieved = rs.getClob(1);
public void testSetClob() throws IOException, SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); is.reset(); PreparedStatement ps_sc = p...
PreparedStatement psChar = prepareStatement( "insert into ClobTestTable values (?,?)"); psChar.setInt(1, 1); psChar.setCharacterStream(2, reader); psChar.execute();
psInsertClob.setInt(1, key); psInsertClob.setCharacterStream(2, reader); psInsertClob.execute();
public void testSetClobLengthless() throws IOException, SQLException { // Insert test data. String testString = "Test string for setCharacterStream\u1A00"; Reader reader = new StringReader(testString); PreparedStatement psChar = prepareStatement( "insert into Cl...
ResultSet rs = s.executeQuery( "select clobCol from ClobTestTable where sno = 1");
psFetchClob.setInt(1, key); ResultSet rs = psFetchClob.executeQuery();
public void testSetClobLengthless() throws IOException, SQLException { // Insert test data. String testString = "Test string for setCharacterStream\u1A00"; Reader reader = new StringReader(testString); PreparedStatement psChar = prepareStatement( "insert into Cl...
psChar.setInt(1, 2); psChar.setClob(2, insertClob); psChar.execute();
psInsertClob.setInt(1, secondKey); psInsertClob.setClob(2, insertClob); psInsertClob.execute();
public void testSetClobLengthless() throws IOException, SQLException { // Insert test data. String testString = "Test string for setCharacterStream\u1A00"; Reader reader = new StringReader(testString); PreparedStatement psChar = prepareStatement( "insert into Cl...
rs = s.executeQuery( "select clobCol from ClobTestTable where sno = 2");
psFetchClob.setInt(1, secondKey); rs = psFetchClob.executeQuery();
public void testSetClobLengthless() throws IOException, SQLException { // Insert test data. String testString = "Test string for setCharacterStream\u1A00"; Reader reader = new StringReader(testString); PreparedStatement psChar = prepareStatement( "insert into Cl...
public final void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException { throw Util.notImplemented();
public void setAsciiStream(String parameterName, InputStream x) throws SQLException { throw Util.notImplemented("setAsciiStream(String,InputStream)");
public final void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException { throw Util.notImplemented(); }
public final void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException { throw Util.notImplemented();
public void setBinaryStream(String parameterName, InputStream x) throws SQLException { throw Util.notImplemented("setBinaryStream(String,InputStream)");
public final void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException { throw Util.notImplemented(); }
public final void setCharacterStream(String parameterName, Reader x, long length) throws SQLException { throw Util.notImplemented();
public void setCharacterStream(String parameterName, Reader reader) throws SQLException { throw Util.notImplemented("setCharacterStream(String,Reader)");
public final void setCharacterStream(String parameterName, Reader x, long length) throws SQLException { throw Util.notImplemented(); }
throw Util.notImplemented();
return getSimpleQuery("getAttributes");
public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException { throw Util.notImplemented(); }
private PreparedStatement getPreparedQuery(String queryName)
protected PreparedStatement getPreparedQuery(String queryName)
private PreparedStatement getPreparedQuery(String queryName) throws SQLException { PreparedStatement s; //We can safely goto system table since we are not in soft upgrade //mode and hence metadata sql in system tables are uptodate //with this Derby release. if (notInSoftUpgradeMode()) s = getPreparedQueryUsin...
private ResultSet getSimpleQuery(String nameKey) throws SQLException
protected ResultSet getSimpleQuery(String nameKey) throws SQLException
private ResultSet getSimpleQuery(String nameKey) throws SQLException { PreparedStatement ps = getPreparedQuery(nameKey); if (ps == null) return null; return ps.executeQuery(); }
throw Util.notImplemented();
return getSimpleQuery("getSuperTables");
public ResultSet getSuperTables(String catalog, String schemaPattern, String typeNamePattern) throws SQLException { throw Util.notImplemented(); }
throw Util.notImplemented();
return getSimpleQuery("getSuperTypes");
public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException { throw Util.notImplemented(); }
throw Util.notImplemented();
return false;
public boolean locatorsUpdateCopy() throws SQLException { throw Util.notImplemented(); }
case TABLEID_INDEX_NUM: row.setColumn(1, getDataValueFactory().getNullChar( (StringDataValue) null)); break;
public ExecIndexRow buildEmptyIndexRow(int indexNumber, RowLocation rowLocation) throws StandardException { ExecIndexRow row = getExecutionFactory().getIndexableRow( indexColumnPositions[indexNumber].length + 1); row.setColumn( row.nColumns(), rowLocation...
case TABLEID_INDEX_NUM: row = getExecutionFactory().getIndexableRow( 1); tableUUIDStr = ((TablePermsDescriptor) perm).getTableUUID().toString(); row.setColumn(1, getDataValueFactory().getCharDataValue( tableUUIDStr)); break;
public ExecIndexRow buildIndexKeyRow( int indexNumber, PermissionsDescriptor perm) throws StandardException { ExecIndexRow row = null; switch( indexNumber) { case GRANTEE_TABLE_GRANTOR_INDEX_NUM: // RESOLVE We do not suppo...
protected String getAuthorizationID( ExecRow row, int columnPos) throws StandardException
protected DataValueDescriptor getAuthorizationID( String value)
protected String getAuthorizationID( ExecRow row, int columnPos) throws StandardException { return row.getColumn( columnPos).getString(); }
return row.getColumn( columnPos).getString();
return getDataValueFactory().getVarcharDataValue( value);
protected String getAuthorizationID( ExecRow row, int columnPos) throws StandardException { return row.getColumn( columnPos).getString(); }
String triggerPriv)
String triggerPriv) throws StandardException
public TablePermsDescriptor( DataDictionary dd, String grantee, String grantor, UUID tableUUID, String selectPriv, String deletePriv, ...
tableName = dd.getTableDescriptor(tableUUID).getName();
public TablePermsDescriptor( DataDictionary dd, String grantee, String grantor, UUID tableUUID, String selectPriv, String deletePriv, ...
ds = getDataSource();
ds = TestDataSourceFactory.getDataSource();
public void setUp() { ds = getDataSource(); }
boolean autoincColumn = (autoincInc != 0);
public TupleDescriptor buildDescriptor( ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd ) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(row.nColumns() == SYSCOLUMNS_COLUMN_COUNT, "Wrong number of columns for a SYSCOLUMNS row"); } int col...
defaultUUID, autoincStart, autoincInc, autoincColumn);
defaultUUID, autoincStart, autoincInc);
public TupleDescriptor buildDescriptor( ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd ) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(row.nColumns() == SYSCOLUMNS_COLUMN_COUNT, "Wrong number of columns for a SYSCOLUMNS row"); } int col...
public BranchControlRow( OpenBTree open_btree, Page page, int level, ControlRow parent, boolean isRoot, long left_child) throws StandardException { super(open_btree, page, level, parent, isRoot); this.left_child_page = new SQLLongint(left_child); this.row[CR_LEFT...
public BranchControlRow() { }
public BranchControlRow( OpenBTree open_btree, Page page, int level, ControlRow parent, boolean isRoot, long left_child) throws StandardException { super(open_btree, page, level, parent, isRoot); this.left_child_page = n...
public Trans(LogWriter lw, TransMeta transMeta)
public Trans(LogWriter lw, String file, String name, String args[])
public Trans(LogWriter lw, TransMeta transMeta) { this(lw, (String)null, (String)null, new String[] { Messages.getString("Trans.Dialog.Description.NoFileNamePreloadedTransformation") }); //$NON-NLS-1$ this.transMeta=transMeta; preview=false; preview_steps=null; preview_sizes=null; log.logMinimal(toString(), Mess...
this(lw, (String)null, (String)null, new String[] { Messages.getString("Trans.Dialog.Description.NoFileNamePreloadedTransformation") }); this.transMeta=transMeta;
log=lw; class_nr = 1; transMeta = new TransMeta(file, name, args);
public Trans(LogWriter lw, TransMeta transMeta) { this(lw, (String)null, (String)null, new String[] { Messages.getString("Trans.Dialog.Description.NoFileNamePreloadedTransformation") }); //$NON-NLS-1$ this.transMeta=transMeta; preview=false; preview_steps=null; preview_sizes=null; log.logMinimal(toString(), Mess...
preview_steps=null; preview_sizes=null; log.logMinimal(toString(), Messages.getString("Trans.Log.TransformationIsPreloaded")); log.logDebug(toString(), Messages.getString("Trans.Log.NumberOfStepsToRun",String.valueOf(transMeta.nrSteps()) ,String.valueOf(transMeta.nrTransHops())));
public Trans(LogWriter lw, TransMeta transMeta) { this(lw, (String)null, (String)null, new String[] { Messages.getString("Trans.Dialog.Description.NoFileNamePreloadedTransformation") }); //$NON-NLS-1$ this.transMeta=transMeta; preview=false; preview_steps=null; preview_sizes=null; log.logMinimal(toString(), Mess...
sb.append("jar");
sb.append(FileResource.JAR_DIRECTORY_NAME);
public static String mkExternalName(String schemaName, String sqlName, char separatorChar) { StringBuffer sb = new StringBuffer(30); sb.append("jar"); sb.append(separatorChar); sb.append(schemaName); sb.append(separatorChar); sb.append(sqlName); sb.append(".jar"); return sb.toString(); }
suite.addTest(BlobClob4BlobTest.suite());
public static Test suite() { TestSuite suite = new TestSuite("jdbcapi"); suite.addTest(ConcurrencyTest.suite()); suite.addTest(HoldabilityTest.suite()); suite.addTest(LobLengthTest.suite()); suite.addTest(ProcedureTest.suite()); suite.addTest(SURQueryMixTest.suite()); suite.addTest(SURTest.suite()); sui...
suite.addTest(new ConcurrencyTest("testSharedLocks2")); if ((JDBC.vmSupportsJDBC3() || JDBC.vmSupportsJSR169())) { suite.addTest(new ConcurrencyTest("testUpdateLockDownGrade1")); suite.addTest(new ConcurrencyTest("testAquireUpdateLock1")); suite.addTest(new ConcurrencyTest("testSharedLocks1")); suite.addTest(new Co...
suite.addTest( TestConfiguration.clientServerDecorator( baseSuite("ConcurrencyTest:client", false)));
public static Test suite() { final TestSuite suite = new TestSuite("ConcurrencyTest"); // This testcase does not require JDBC3/JSR169, since it does not // specify result set concurrency) in Connection.createStatement(). suite.addTest(new ConcurrencyTest("testSharedLocks2")); ...
final Properties properties = new Properties(); properties.setProperty("derby.locks.waitTimeout", "4"); return new DatabasePropertyTestSetup(suite, properties);
return DatabasePropertyTestSetup.setLockTimeouts(suite, -1, 4);
public static Test suite() { final TestSuite suite = new TestSuite("ConcurrencyTest"); // This testcase does not require JDBC3/JSR169, since it does not // specify result set concurrency) in Connection.createStatement(). suite.addTest(new ConcurrencyTest("testSharedLocks2")); ...
for (Iterator i = SURDataModelSetup.SURDataModel.values().iterator(); i.hasNext();) { SURDataModelSetup.SURDataModel model = (SURDataModelSetup.SURDataModel) i.next(); TestSuite suite = createTestCases(model.toString()); TestSetup decorator = new SURDataModelSetup(suite, model); mainSuite.addTest(decorator); }
mainSuite.addTest(baseSuite("SURQueryMixTest:embedded")); mainSuite.addTest( TestConfiguration.clientServerDecorator( baseSuite("SURQueryMixTest:client")));
public static Test suite() { TestSuite mainSuite = new TestSuite("SURQueryMixTest suite"); // DB2 client doesn't support this functionality if (usingDerbyNet()) return mainSuite; // Iterate over all data models and decorate the tests: for (Itera...
TestSuite suite = new TestSuite("UpdateXXXTest");
public static Test suite() { TestSuite suite = new TestSuite("UpdateXXXTest"); // DB2 client doesn't support this functionality if (usingDerbyNet()) return suite; suite.addTestSuite(UpdateXXXTest.class); // requires java.math.BigDecimal if...
return suite;
return new TestSuite("empty");
public static Test suite() { TestSuite suite = new TestSuite("UpdateXXXTest"); // DB2 client doesn't support this functionality if (usingDerbyNet()) return suite; suite.addTestSuite(UpdateXXXTest.class); // requires java.math.BigDecimal if...
suite.addTestSuite(UpdateXXXTest.class);
TestSuite suite = baseSuite("UpdateXXXTest");
public static Test suite() { TestSuite suite = new TestSuite("UpdateXXXTest"); // DB2 client doesn't support this functionality if (usingDerbyNet()) return suite; suite.addTestSuite(UpdateXXXTest.class); // requires java.math.BigDecimal if...
if (JDBC.vmSupportsJDBC2()) suite.addTest(new UpdateXXXTest("jdbc2testUpdateBigDecimal"));
suite.addTest( TestConfiguration.clientServerDecorator( baseSuite("UpdateXXXTest:client")));
public static Test suite() { TestSuite suite = new TestSuite("UpdateXXXTest"); // DB2 client doesn't support this functionality if (usingDerbyNet()) return suite; suite.addTestSuite(UpdateXXXTest.class); // requires java.math.BigDecimal if...
return new TestSuite(ResultSetCloseTest.class,"ResultSetCloseTest suite");
TestSuite suite = new TestSuite("ResultSetCloseTest"); if (usingDerbyNet()) return suite; suite.addTestSuite(ResultSetCloseTest.class); return suite;
public static Test suite() { return new TestSuite(ResultSetCloseTest.class,"ResultSetCloseTest suite"); }
if (usingEmbedded()) { Method[] methods = DataSourcePropertiesTest.class.getMethods(); for (int i = 0; i < methods.length; i++) { Method m = methods[i]; if (m.getParameterTypes().length > 0 || m.getReturnType().equals(Void.TYPE)) { continue; } String name = m.getName(); if (name.startsWith("embedded")) { suite.addTes...
Method[] methods = DataSourcePropertiesTest.class.getMethods(); for (int i = 0; i < methods.length; i++) { Method m = methods[i]; if (m.getParameterTypes().length > 0 || !m.getReturnType().equals(Void.TYPE)) { continue; } String name = m.getName(); if (name.startsWith("embedded")) { suite.addTest(new DataSourceProperti...
public static Test suite() { TestSuite suite = new TestSuite("DataSourcePropertiesTest"); // TODO: Run fixtures in J2ME and JDBC2 (with extensions) // that can be supported there. This disabling matches // the original _app.properties file. Concern was over ...
public Statement(Agent agent, Connection connection) throws SqlException { this(); initStatement(agent, connection);
private Statement() throws SqlException { initStatement();
public Statement(Agent agent, Connection connection) throws SqlException { this(); initStatement(agent, connection); }
new ClientMessageId(SQLState.LANG_STATEMENT_CLOSED_NO_REASON));
new ClientMessageId(SQLState.ALREADY_CLOSED), "Statement");
void checkForClosedStatement() throws SqlException { // For some odd reason, there was a JVM hotspot error with Sun's 1.4 JDK // when the code was written like this: // agent_checkForDeferredExceptions(); // if (!openOnClient_) // throw new SqlException (agent_.logWriter_, "Inva...
public BatchUpdateException(LogWriter logWriter, String reason, int[] updateCounts) { super(reason, null, -99999, updateCounts);
public BatchUpdateException(LogWriter logWriter, MessageId msgid, Object[] args, int[] updateCounts) { super( msgutil_.getCompleteMessage( msgid.msgid, args), ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid), ExceptionUtil.getSeverityFromIdentifier(msgid.msgid), updateCounts);
public BatchUpdateException(LogWriter logWriter, String reason, int[] updateCounts) { super(reason, null, -99999, updateCounts); if (logWriter != null) { logWriter.traceDiagnosable(this); } }
void markResultSetsClosed(boolean removeListener) { if (resultSetList_ != null) { for (int i = 0; i < resultSetList_.length; i++) { if (resultSetList_[i] != null) { resultSetList_[i].markClosed(removeListener); } resultSetList_[i] = null; } } if (generatedKeysResultSet_ != null) { generatedKeysResultSet_.markClosed(rem...
void markResultSetsClosed() { markResultSetsClosed(false);
void markResultSetsClosed(boolean removeListener) { if (resultSetList_ != null) { for (int i = 0; i < resultSetList_.length; i++) { if (resultSetList_[i] != null) { resultSetList_[i].markClosed(removeListener); } resultSetList_[i] = n...
public ColumnMetaData(LogWriter logWriter, int upperBound) {
public ColumnMetaData(LogWriter logWriter) {
public ColumnMetaData(LogWriter logWriter, int upperBound) { logWriter_ = logWriter; initializeCache(upperBound); }
initializeCache(upperBound);
public ColumnMetaData(LogWriter logWriter, int upperBound) { logWriter_ = logWriter; initializeCache(upperBound); }
public void resetStatement(Agent agent, Connection connection) throws SqlException { resetStatement(); initStatement(agent, connection);
private void resetStatement() throws SqlException { initStatement();
public void resetStatement(Agent agent, Connection connection) throws SqlException { resetStatement(); initStatement(agent, connection); }
final Object setObject(int targetType, Object source) throws SqlException { if (source instanceof Boolean) { return setObject(targetType, ((Boolean) source).booleanValue()); } else if (source instanceof Integer) { return setObject(targetType, ((Integer) source).intValue()); } else if (source instanceof Long) { return s...
final Object setObject(int targetType, boolean source) throws SqlException { return setObject(targetType, (short) (source ? 1 : 0));
final Object setObject(int targetType, Object source) throws SqlException { if (source instanceof Boolean) { return setObject(targetType, ((Boolean) source).booleanValue()); } else if (source instanceof Integer) { return setObject(targetType, ((Integer) source).intValue()); ...
costEstimate = getFinalCostEstimate();
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { if (SanityManager.DEBUG) SanityManager.ASSERT(resultColumns != null, "Tree structure bad"); /* ** Check and see if everything below us is a constant or not. ** If so, we'll let execution know that it c...
optimizerToBestPlanMap = null;
public void init(Object correlationName, Object tableProperties) { this.correlationName = (String) correlationName; this.tableProperties = (Properties) tableProperties; tableNumber = -1; }
public HashScanResultSet(long conglomId,
HashScanResultSet(long conglomId,
public HashScanResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualif...