Beispiel #1
0
 protected override void LimitRecordsReturned(StringTheory query, int limit)
 {
     if (limit > -1)
     {
         query.Prepend(query.CutThru("SELECT") + " TOP " + limit);
     }
 }
Beispiel #2
0
 protected override void LimitRecordsReturned(StringTheory query, int limit)
 {
     if (limit > -1)
     {
         query.Prepend("SELECT * FROM (");
         query.Append(") WHERE rownum < ");
         query.Append((limit + 1).ToString());
         query.Append(" ");
     }
 }
Beispiel #3
0
        protected XmlNode fetchNode(string nodePath)
        {
            StringTheory theory = new StringTheory(nodePath);

            if (theory.First() != '/')
            {
                theory.Prepend("/");
            }
            return(this.doc.DocumentElement.SelectSingleNode(theory.ToString()));
        }
 public void testPrepend()
 {
     string str = "abcxyz";
     StringTheory theory = new StringTheory("xyz");
     theory.Prepend("abc");
     Assert.True(str.Equals(theory.ToString()), "Simple string prepend failed");
     str = "abcxyz";
     theory = new StringTheory("xyz");
     StringTheory theory2 = new StringTheory("abc");
     theory.Prepend(theory2);
     Assert.True(str.Equals(theory.ToString()), "StringTheory prepend failed");
     str = "FooFooFooxyz";
     theory = new StringTheory("xyz");
     string[] strArray = new string[] { "Foo", "Foo", "Foo" };
     theory.Prepend((object[])strArray);
     Assert.True(str.Equals(theory.ToString()), "StringTheory prepend(array) failed");
     str = "FooFooFooxyz";
     theory = new StringTheory("xyz");
     ArrayList list = new ArrayList();
     list.Add("Foo");
     list.Add("Foo");
     list.Add("Foo");
     theory.Prepend((ICollection)list);
     Assert.True(str.Equals(theory.ToString()), "StringTheory prepend(ArrayList) failed" + theory);
 }