예제 #1
0
        public List<string> GenerateRawSQLStatement(RawSQL statement)
        {
            if (statement.Engines.Count > 0 &&
            statement.Engines.Contains("PGSQL") == false)
            return new List<string>() { };

             return new List<string>() { statement.Statement };
        }
예제 #2
0
        public List<string> GenerateRawSQLStatement(RawSQL statement)
        {
            if (statement.Engines.Count > 0 &&
             statement.Engines.Contains("MySQL") == false)
            return new List<string>() { };

             if (statement.Statement.Contains(";"))
             {
            // Multiple statements.
            if (!statement.Statement.Contains(StatementSeparator))
            {
               throw new Exception("RawSQL statement with multiple statements must contain statement separator." + Environment.NewLine + statement.Statement);
            }
             }

             return new List<string>() { statement.Statement };
        }
예제 #3
0
        private IStatement ParseRawSQLStatement(XmlNode statement)
        {
            RawSQL rawSQLStatement = new RawSQL();
             rawSQLStatement.Statement = statement.InnerText;

             foreach (XmlAttribute attribute in statement.Attributes)
             {
            if (string.Compare(attribute.Name, "Engine", true) == 0)
            {
               rawSQLStatement.Engines.Add(attribute.Value);
            }
             }

             return rawSQLStatement;
        }