コード例 #1
0
        void ISqlProvider.GetSQL()
        {
            DC.SQL.Clear();
            switch (DC.Method)
            {
            case UiMethodEnum.Create:
            case UiMethodEnum.CreateBatch:
                InsertInto(X); Table(); InsertColumn(); Values(X); InsertValue(); End();
                break;

            case UiMethodEnum.Delete:
                Delete(X); From(X); Table(); Where(); End();
                break;

            case UiMethodEnum.Update:
                Update(X); Table(); Set(X); UpdateColumn(); Where(); End();
                break;

            case UiMethodEnum.Top:
            case UiMethodEnum.QueryOne:
            case UiMethodEnum.QueryList:
                Select(X); DistinctX(); DbSql.Top(DC, X); SelectColumn(); From(X); Table(); Where(); OrderBy(); End();
                break;

            case UiMethodEnum.QueryPaging:
                Select(X); Count(); From(X); Table(); Where(); CountMulti(); End();
                Select(X); DistinctX(); SelectColumn(); From(X); Table(); Where(); OrderBy(); DbSql.Pager(DC, X); End();
                break;

            case UiMethodEnum.IsExist:
            case UiMethodEnum.Count:
                Select(X); Count(); From(X); Table(); Where(); CountMulti(); End();
                break;

            case UiMethodEnum.Sum:
                Select(X); Sum(); From(X); Table(); Where(); End();
                break;
            }
        }