Package org.xmlBlaster.contrib.db

Examples of org.xmlBlaster.contrib.db.I_DbPool.update()


         conn.setAutoCommit(true);
         String sql = null;
         {
            try {
               sql = "CREATE TABLE " + this.tableName + " (name VARCHAR(20), age INTEGER, PRIMARY KEY(name))";
               pool.update(sql);
               Thread.sleep(500L);
               conn = this.pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = st.executeQuery("SELECT * from " + this.replPrefix + "items");
               assertEquals("Testing creation of table '" + this.tableName + "' checking that the operation generated an entry in " + this.replPrefix + "items", true, rs.next());
View Full Code Here


         this.dbSpecific.readNewTable(null, this.specificHelper.getOwnSchema(this.pool), this.dbHelper.getIdentifier(this.tableName), null, true);

         {
            try {
               sql = "INSERT INTO " + this.tableName + " VALUES ('first', 44)";
               pool.update(sql);
               Thread.sleep(500L);
               conn = this.pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = st.executeQuery("SELECT * from " + this.replPrefix + "items");
               assertEquals("Testing insertion into table '" + this.tableName + "' checking that the operation generated an entry in " + this.replPrefix + "items", true, rs.next());
View Full Code Here

         }

         {
            try {
               sql = "UPDATE " + this.tableName + " SET age=33 WHERE name='first'";
               pool.update(sql);
               Thread.sleep(500L);
               conn = this.pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = st.executeQuery("SELECT * from " + this.replPrefix + "items");
               assertEquals("Testing UPDATE of table '" + this.tableName + "' checking that the operation generated an entry in " + this.replPrefix + "items", true, rs.next());
View Full Code Here

         }

         {
            try {
               sql = "DELETE FROM " + this.tableName;
               pool.update(sql);
               Thread.sleep(500L);
               conn = this.pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = st.executeQuery("SELECT * from " + this.replPrefix + "items");
               assertEquals("Testing DELETE of table '" + this.tableName + "' checking that the operation generated an entry in " + this.replPrefix + "items", true, rs.next());
View Full Code Here

         }

         {
            try {
               sql = "ALTER TABLE " + this.tableName + " ADD (city VARCHAR(30))";
               pool.update(sql);
               Thread.sleep(500L);
               conn = this.pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = st.executeQuery("SELECT * from " + this.replPrefix + "items");
               assertEquals("Testing ALTER of table '" + this.tableName + "' checking that the operation generated an entry in " + this.replPrefix + "items", true, rs.next());
View Full Code Here

            }
         }
         {
            try {
               sql = "DROP TABLE " + this.tableName;
               pool.update(sql);
               Thread.sleep(500L);
               conn = this.pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = st.executeQuery("SELECT * from " + this.replPrefix + "items");
               assertEquals("Testing DROP table '" + this.tableName + "' checking that the operation generated an entry in " + this.replPrefix + "items", true, rs.next());
View Full Code Here

         conn.setAutoCommit(true);
         String sql = null;
         {
            try {
               sql = "CREATE TABLE " + this.tableName + " (name VARCHAR(20), comments LONG, PRIMARY KEY(name))";
               pool.update(sql);
               Thread.sleep(500L);
               conn = this.pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = st.executeQuery("SELECT * from " + this.replPrefix + "items");
               assertEquals("Testing creation of table '" + this.tableName + "' checking that the operation generated an entry in " + this.replPrefix + "items", true, rs.next());
View Full Code Here

         this.dbSpecific.readNewTable(null, this.specificHelper.getOwnSchema(this.pool), this.dbHelper.getIdentifier(this.tableName), null, true);

         {
            try {
               sql = "INSERT INTO " + this.tableName + " VALUES ('first', 'some very long text here')";
               pool.update(sql);
               Thread.sleep(500L);
               conn = this.pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = st.executeQuery("SELECT * from " + this.replPrefix + "items");
               assertEquals("Testing insertion into table '" + this.tableName + "' checking that the operation generated an entry in " + this.replPrefix + "items", true, rs.next());
View Full Code Here

         }

         {
            try {
               sql = "UPDATE " + this.tableName + " SET comments='some very long text here' WHERE name='first'";
               pool.update(sql);
               Thread.sleep(500L);
               conn = this.pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = st.executeQuery("SELECT * from " + this.replPrefix + "items");
               assertEquals("Testing UPDATE of table '" + this.tableName + "' checking that the operation generated an entry in " + this.replPrefix + "items", true, rs.next());
View Full Code Here

         }

         {
            try {
               sql = "DELETE FROM " + this.tableName;
               pool.update(sql);
               Thread.sleep(500L);
               conn = this.pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = st.executeQuery("SELECT * from " + this.replPrefix + "items");
               assertEquals("Testing DELETE of table '" + this.tableName + "' checking that the operation generated an entry in " + this.replPrefix + "items", true, rs.next());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.