Пример #1
0
        public System.Data.Linq.IExecuteResult Execute(System.Linq.Expressions.Expression query, Type tableRowType)
        {
            var builder    = new FqlQueryBuilder(query);
            var fql        = builder.BuildQuery();
            var resultType = query.Type;            //

            if (resultType.IsGenericType)
            {
                resultType = resultType.GetGenericArguments()[0];
            }
            if (fql.StartsWith("from "))
            {
                fql = "select * " + fql;
            }


            //QueryBuilder2
            //var builder = new FqlQueryBuilder(query);
            //var fql = builder.BuildQuery();
            //var select = builder.Select;
            //var resultType = query.Type.GetGenericArguments()[0];
            fql = FqlDataContext.FixQuery(fql);
            var response = ExecuteFqlQuery(fql);

            return(new FqlExecuteResult(response, resultType, tableRowType, builder.QueryOptions));
        }
Пример #2
0
 public FqlTable(FqlDataContext db)
 {
     this.context = db;
 }
Пример #3
0
 // Methods
 public FqlDataQuery(FqlDataContext context, Expression expression, Type tableRowType)
 {
     this.context         = context;
     this.queryExpression = expression;
     this.tableRowType    = tableRowType;
 }