public override bool NextState(TheWord word) { if (word.text.ToLower() == "select") { //Тогда вложенный запрос. Link l = new Link(this.mainClass.Tr, this.mainClass.ArrayWords); l.AddWordBegin("select", TypeWord.TERM); l.Run(); SQLStruct st = (SQLStruct) this.mainClass.data; if (l.data != null) st.select.Add(l.data); else throw new NoOneClass("Ошибка во вложенном запросе."); this.link = this.mainClass.select_stmt_1; }/*else if (word.text.ToLower() == "once") { mainClass.data.select.selectType = SELECTTYPE.ONCE; this.link = this.mainClass.select_stmt_0; }else if (word.text.ToLower() == "all") { mainClass.data.select.selectType = SELECTTYPE.ALL; this.link = this.mainClass.select_all; }*/else if (word.text.ToLower() == "use") { this.link = this.mainClass.select_all_use; } /*else if (word.type == TypeWord.TERM && word.text.ToLower() == "*") { SQLStruct st = (SQLStruct) this.mainClass.data; st.select.Add(word.text); this.link = this.mainClass.select_stmt_1; }*/ else if (word.type == TypeWord.TERM) { SQLStruct st = (SQLStruct) this.mainClass.data; st.select.Add(word.text); this.link = this.mainClass.select_stmt_1; } else throw new NoOneClass("Состояние: Select_stmt, слово = " + word.text); return true; }
public Where_Column2(Link l) : base (l) {}
public Select_Paint_Col_Name(Link l) : base (l) {}
public Select_Paint_Value(Link l) : base (l) {}
public Select_Paint_Col_Word(Link l) : base (l) {}
public Select_Key_Point(Link l) : base (l) {}
public Select_Stmt(Link l) : base (l) {}
public From_Where(Link l) : base (l) {}
public From_1(Link l) : base (l) {}
public Where_Table1(Link l) : base (l) {}
public BaseWhere(Link l): base(l){}
public Where_Comp(Link l) : base (l) {}
public Where(Link l) : base (l) {}
public Where_Point2(Link l) : base (l) {}
public Select_Once(Link l) : base (l) {}
public From_Table_1(Link l) : base (l) {}
public Select_Key_1(Link l) : base (l) {}
public From(Link l) : base (l) {}
public Select_Key_Value_2(Link l) : base (l) {}
public From_Join(Link l) : base (l) {}
public Select_Paint_Col(Link l) : base (l) {}
public Select(Link l) : base (l) {}
public Select_Paint_Col_Point(Link l) : base (l) {}
public override bool NextState(TheWord word) { //int u=0; ////Console.WriteLine(this.ToString() + ": " + word.text); if (word.text.ToLower() == "select") { //Тогда вложенный запрос. Link l = new Link(this.mainClass.Tr, this.mainClass.ArrayWords); l.AddWordBegin("select", TypeWord.TERM); l.Run(); SQLStruct st = (SQLStruct) this.mainClass.data; if (l.data != null) st.select.Add(l.data); else throw new NoOneClass("Ошибка во вложенном запросе."); this.link = this.mainClass.select_stmt_1; } /*else if (word.type == TypeWord.TERM && word.text.ToLower() == "*") { SQLStruct st = (SQLStruct) this.mainClass.data; st.select.Add(word.text); this.link = this.mainClass.select_stmt_1; }*/ else if (word.type == TypeWord.TERM) { SQLStruct st = (SQLStruct) this.mainClass.data; st.select.Add(word.text); this.link = this.mainClass.select_stmt_1; } else throw new NoOneClass("Состояние: Select_stmt, слово = " + word.text); return true; }
public Select_Paint_For(Link l) : base (l) {}
public Select_All_1(Link l) : base (l) {}
public Select_Paint_Use(Link l) : base (l) {}
public Select_All_Word(Link l) : base (l) {}
public Select_Paint_Other_Tag(Link l) : base (l) {}
public As(Link l) : base (l) {}