Example #1
0
        //At the moment parser only supports mysql,mariadb,postgresql
        //any other db i just execute all in one statement
        internal static List <string> convert(sqlbox.commons.DbType dbtype, string query)
        {
            List <string> statementList = null;

            if (dbtype == sqlbox.commons.DbType.MYSQL || dbtype == sqlbox.commons.DbType.MARIADB || dbtype == sqlbox.commons.DbType.POSTGRES)
            {
                var parser = new SqlStatementParserWrapper(query, (com.protectsoft.SqlStatementParser.DbType)(int) dbtype);
                statementList = SqlStatementParserWrapper.convert(parser.sql, parser.Parse());
            }
            else
            {
                statementList = new List <string>();
                statementList.Add(query);
            }
            return(statementList);
        }
Example #2
0
 public static bool IsDbEmbedded(sqlbox.commons.DbType type)
 {
     return(type == sqlbox.commons.DbType.SQLITE || type == sqlbox.commons.DbType.VISTADB);
 }