Ejemplo n.º 1
0
 public virtual void Visit(SoqlBooleanLiteralExpression v)
 {
     Output.Write(v.Value);
 }
 void Sooda.QL.ISoqlVisitor.Visit(SoqlBooleanLiteralExpression v)
 {
     // nothing here
 }
Ejemplo n.º 3
0
 public virtual void Visit(SoqlBooleanLiteralExpression v)
 {
     Output.Write(v.Value);
 }
Ejemplo n.º 4
0
        protected virtual void GetListData(ListInfo li, string listQuery, TextWriter output)
        {
            SoqlBooleanExpression expr = new SoqlBooleanLiteralExpression(true);
            SoqlQueryExpression exp = BuildDataQuery(li, expr, new List<string>(), 0, 1000, "", new List<string>());

            ArrayList qParams = new ArrayList();
            XmlWriterSettings s = new XmlWriterSettings();
            s.OmitXmlDeclaration = true;
            XmlWriter xw = XmlWriter.Create(output, s);
            xw.WriteStartElement("results");
            using (SoodaDataSource ds = DatabaseSchema.DataSources[0].CreateDataSource())
            {
                ds.Open();
                string sql = SoqlToSql(exp, (SqlDataSource) ds);

                using (IDataReader dr = ds.ExecuteRawQuery(sql, qParams))
                {
                    while(dr.Read())
                    {
                        xw.WriteStartElement("row");
                        for (int i = 0; i < dr.FieldCount; i++)
                        {
                            xw.WriteElementString(dr.GetName(i), Convert.ToString(dr.GetValue(i)));
                        }
                        xw.WriteEndElement();
                    }
                }
            }
            xw.WriteEndElement();
            xw.Flush();
        }
 void Sooda.QL.ISoqlVisitor.Visit(SoqlBooleanLiteralExpression v)
 {
     // nothing here
 }
Ejemplo n.º 6
0
 public override void Visit(SoqlBooleanLiteralExpression v)
 {
     if (DisableBooleanExpansion)
     {
         Output.Write(v.Value ? '1' : '0');
     }
     else
     {
         Output.Write(v.Value ? "(1=1)" : "(0=1)");
     }
 }