Exemplo n.º 1
0
 public TableVariableResolver(Table table)
     : this(table, -1)
 {
 }
Exemplo n.º 2
0
 public TableVariableResolver(Table table, int rowIndex)
 {
     this.table = table;
     this.rowIndex = rowIndex;
 }
Exemplo n.º 3
0
        private ITable FindEntry(Table table, ObjectName routineName)
        {
            var schemav = table.GetResolvedColumnName(0);
            var namev = table.GetResolvedColumnName(1);

            using (var context = new SystemQueryContext(transaction, transaction.CurrentSchema())) {
                var t = table.SimpleSelect(context, namev, SqlExpressionType.Equal,
                    SqlExpression.Constant(DataObject.String(routineName.Name)));
                t = t.ExhaustiveSelect(context,
                    SqlExpression.Equal(SqlExpression.Reference(schemav),
                        SqlExpression.Constant(DataObject.String(routineName.ParentName))));

                // This should be at most 1 row in size
                if (t.RowCount > 1)
                    throw new Exception("Assert failed: multiple procedure names for " + routineName);

                // Return the entries found.
                return t;
            }
        }