// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/impl/CloseUtil.java
// public class CloseUtil {
// 
//     private CloseUtil() {
//     }
// 
//     public static void close(Closeable closeable) {
//         try {
//             if (closeable != null) {
//                 closeable.close();
//             }
//         } catch (Exception e) {	/* findBugs ok */ }
//     }
// 
//     public static void close(Statement statement) {
//         try {
//             if (statement != null) {
//                 statement.close();
//             }
//         } catch (Exception e) {	/* findBugs ok */ }
//     }
// 
//     public static void close(Connection conn) {
//         try {
//             if (conn != null) {
//                 conn.close();
//             }
//         } catch (Exception e) {	/* findBugs ok */ }
//     }
// 
//     public static void close(ResultSet rs) {
//         try {
//             if (rs != null) {
//                 rs.close();
//             }
//         } catch (Exception e) {	/* findBugs ok */ }
//     }
// 
// }


import org.jsoftware.dbpatch.impl.CloseUtil;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;
package org.jsoftware.dbpatch.config.dialect;



/**
 * HsqlDb dialect
 *
 * @author szalik
 */
public class HsqlDialect extends DefaultDialect {
    private static final long serialVersionUID = -1090776645312248L;

    public Timestamp getNow(Connection con) throws SQLException {
        Statement stm = null;
        ResultSet rs = null;
        try {
            stm = con.createStatement();
            rs = stm.executeQuery("VALUES (CURRENT_TIMESTAMP)");
            if (rs.next()) {
                return rs.getTimestamp(1);
            } else {
                throw new SQLException("No rows returned.");
            }
        } finally {
// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/impl/CloseUtil.java
// public class CloseUtil {
// 
//     private CloseUtil() {
//     }
// 
//     public static void close(Closeable closeable) {
//         try {
//             if (closeable != null) {
//                 closeable.close();
//             }
//         } catch (Exception e) {	/* findBugs ok */ }
//     }
// 
//     public static void close(Statement statement) {
//         try {
//             if (statement != null) {
//                 statement.close();
//             }
//         } catch (Exception e) {	/* findBugs ok */ }
//     }
// 
//     public static void close(Connection conn) {
//         try {
//             if (conn != null) {
//                 conn.close();
//             }
//         } catch (Exception e) {	/* findBugs ok */ }
//     }
// 
//     public static void close(ResultSet rs) {
//         try {
//             if (rs != null) {
//                 rs.close();
//             }
//         } catch (Exception e) {	/* findBugs ok */ }
//     }
// 
// }


// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/config/dialect/HsqlDialect.java
import org.jsoftware.dbpatch.impl.CloseUtil;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;

package org.jsoftware.dbpatch.config.dialect;



/**
 * HsqlDb dialect
 *
 * @author szalik
 */
public class HsqlDialect extends DefaultDialect {
    private static final long serialVersionUID = -1090776645312248L;

    public Timestamp getNow(Connection con) throws SQLException {
        Statement stm = null;
        ResultSet rs = null;
        try {
            stm = con.createStatement();
            rs = stm.executeQuery("VALUES (CURRENT_TIMESTAMP)");
            if (rs.next()) {
                return rs.getTimestamp(1);
            } else {
                throw new SQLException("No rows returned.");
            }
        } finally {
            CloseUtil.close(rs);