コード例 #1
0
        public static LinkRequestTable MakeLinkRequest(TableLink metaLink, Table sourceTable, Column sourceColumn, long sourceRow, Database.Operation.ExpressionParsingContext expressionParsingContext)
        {
            if (metaLink == null)
            {
                return(null);
            }
            using (ScopeDebugContext.Func(() => { return("MakeLinkRequest from table '" + sourceTable.GetName() + "' row " + sourceRow); }))
            {
                var lr = new LinkRequestTable();
                lr.LinkToOpen   = metaLink;
                lr.SourceTable  = sourceTable;
                lr.SourceView   = sourceTable as View.ViewTable;
                lr.SourceColumn = sourceColumn;
                lr.SourceRow    = sourceRow;

                if (lr.LinkToOpen.Parameters != null)
                {
                    foreach (var p in lr.LinkToOpen.Parameters)
                    {
                        var opt            = new Operation.Expression.ParseIdentifierOption(sourceTable.Schema as View.ViewSchema, sourceTable, true, true, typeof(string), expressionParsingContext);
                        var metaExpression = new Operation.Expression.MetaExpression(p.Value, true);
                        var exp            = Operation.Expression.ParseIdentifier(metaExpression, opt);
                        var exp2           = Operation.ColumnCreator.CreateTypedExpressionFixedRow(exp, sourceRow);
                        lr.Parameters.Add(p.Key, exp2);
                    }
                }
                return(lr);
            }
        }
コード例 #2
0
ファイル: Select.cs プロジェクト: MyJules/Story-OF-Muriculus
 public Where.Builder AddWhere(string column, Operation.Operator op, Operation.Expression.MetaExpression value)
 {
     Where.Builder w = new Where.Builder(column, op, value);
     where.Add(w);
     return(w);
 }
コード例 #3
0
 public Builder(string column, Operation.Operator op, Operation.Expression.MetaExpression value)
 {
     comparison = new Operation.MetaColumnComparison(column, op, value);
 }
コード例 #4
0
 public Builder(string name, Operation.Expression.MetaExpression value)
 {
     this.name  = name;
     this.value = value;
 }