Esempio n. 1
0
 private void ParseCountElement(LookaheadEnumerator <XmlSimpleReader.XmlElement> xmlReader)
 {
     XmlSimpleReader.XmlStartElement countElement = this.ReadElement(xmlReader, "count");
     this.HasAutoWhereAttrOnly(countElement);
     this.ReadEndElement(xmlReader, "count");
     //COUNT文を取得する
     _countSql = countElement.Contents;
 }
Esempio n. 2
0
 private void ParseFindElement(LookaheadEnumerator <XmlSimpleReader.XmlElement> xmlReader)
 {
     XmlSimpleReader.XmlStartElement findElement = this.ReadElement(xmlReader, "find");
     this.HasAutoWhereAttrOnly(findElement);
     this.ReadEndElement(xmlReader, "find");
     //SELECT文を取得する
     _findSql = findElement.Contents;
 }
Esempio n. 3
0
 private void HasAutoWhereAttrOnly(XmlSimpleReader.XmlStartElement element)
 {
     foreach (KeyValuePair <string, string> attr in element.Attributes)
     {
         if (attr.Key != "autoWhere")
         {
             throw new BadFormatSqlPodException(
                       "'" + element.Name + "'タグに指定できる属性は'autoWhere'のみです");
         }
     }
 }
Esempio n. 4
0
        private void ParseSqlEntryElement(LookaheadEnumerator <XmlSimpleReader.XmlElement> xmlReader)
        {
            XmlSimpleReader.XmlStartElement sqlEntryElement = this.ReadElement(xmlReader);
            if (sqlEntryElement.HasAttributes)
            {
                throw new BadFormatSqlPodException("sqlエントリタグに属性は指定できません");
            }
            _definedSqlEntries.Add(sqlEntryElement);

            //SQL文を取得する
            _entrySqls[sqlEntryElement.Name] = sqlEntryElement.Contents;

            this.ReadEndElement(xmlReader, sqlEntryElement.Name);
        }