// Path: database/src/main/java/com/simple/database/utils/IOUtils.java
// public final class IOUtils {
// 
//     /**
//      * 关闭Closeable对象
//      * @param closeable 要关闭的closeable
//      */
// 	public static void closeSilently(Closeable closeable) {
// 		if (closeable != null) {
// 			try {
// 				closeable.close();
// 			} catch (Exception e) {
// 				e.printStackTrace();
// 			}
// 		}
// 	}
// 
//     /**
//      * 关闭cursor对象, 在api 16之前Cursor对象没有实现 Closeable 接口 ！！！！
//      * @param cursor 要关闭的cursor
//      */
//     public static void closeCursor(Cursor cursor) {
//         if (cursor != null) {
//             try {
//                 cursor.close();
//             } catch (Exception e) {
//                 e.printStackTrace();
//             }
//         }
//     }
// }


import com.simple.database.utils.IOUtils;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

                } else if (state == STATE_NONE && tokenizer.skip("--")) {
                    state = STATE_COMMENT;
                    continue;

                } else if (state == STATE_NONE && c == ';') {
                    final String command = sb.toString().trim();
                    commands.add(command);
                    sb.setLength(0);
                    continue;

                } else if (state == STATE_NONE && c == '\'') {
                    state = STATE_STRING;

                } else if (state == STATE_STRING && c == '\'') {
                    state = STATE_NONE;

                }

                if (state == STATE_NONE || state == STATE_STRING) {
                    if (state == STATE_NONE && isWhitespace(c)) {
                        if (sb.length() > 0 && sb.charAt(sb.length() - 1) != ' ') {
                            sb.append(' ');
                        }
                    } else {
                        sb.append(c);
                    }
                }
            }
        } finally {
// Path: database/src/main/java/com/simple/database/utils/IOUtils.java
// public final class IOUtils {
// 
//     /**
//      * 关闭Closeable对象
//      * @param closeable 要关闭的closeable
//      */
// 	public static void closeSilently(Closeable closeable) {
// 		if (closeable != null) {
// 			try {
// 				closeable.close();
// 			} catch (Exception e) {
// 				e.printStackTrace();
// 			}
// 		}
// 	}
// 
//     /**
//      * 关闭cursor对象, 在api 16之前Cursor对象没有实现 Closeable 接口 ！！！！
//      * @param cursor 要关闭的cursor
//      */
//     public static void closeCursor(Cursor cursor) {
//         if (cursor != null) {
//             try {
//                 cursor.close();
//             } catch (Exception e) {
//                 e.printStackTrace();
//             }
//         }
//     }
// }


// Path: database/src/main/java/com/simple/database/upgrade/SqlParser.java
import com.simple.database.utils.IOUtils;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;


                } else if (state == STATE_NONE && tokenizer.skip("--")) {
                    state = STATE_COMMENT;
                    continue;

                } else if (state == STATE_NONE && c == ';') {
                    final String command = sb.toString().trim();
                    commands.add(command);
                    sb.setLength(0);
                    continue;

                } else if (state == STATE_NONE && c == '\'') {
                    state = STATE_STRING;

                } else if (state == STATE_STRING && c == '\'') {
                    state = STATE_NONE;

                }

                if (state == STATE_NONE || state == STATE_STRING) {
                    if (state == STATE_NONE && isWhitespace(c)) {
                        if (sb.length() > 0 && sb.charAt(sb.length() - 1) != ' ') {
                            sb.append(' ');
                        }
                    } else {
                        sb.append(c);
                    }
                }
            }
        } finally {
            IOUtils.closeSilently(buffer);