Ejemplo n.º 1
0
		public OpenxmlFunction(VariableName variableName, SqlScriptableToken stringValue, IntegerLiteral flags, Optional<OpenxmlSchema> schema) {
			Debug.Assert(variableName != null);
			Debug.Assert(stringValue != null);
			Debug.Assert(schema != null);
			this.variableName = variableName;
			this.stringValue = stringValue;
			this.flags = (flags == null) ? 0 : (int)flags.Value;
			this.schema = schema;
		}
Ejemplo n.º 2
0
		public ExecuteStatement(VariableName resultVariableName, Qualified<SchemaName, ProcedureName> procedureName, Optional<Sequence<ExecuteParameter>> parameters, OptionToken option) {
			Debug.Assert(procedureName != null);
			this.resultVariableName = resultVariableName;
			this.procedureName = procedureName;
			this.parameters = parameters.ToList();
			this.option = option;
			if (!procedureName.IsQualified && procedureName.Name.Value.StartsWith("sp_", StringComparison.OrdinalIgnoreCase)) {
				procedureName.LockOverride();
				int[] parameterPositions;
				if (objectNameParameters.TryGetValue(procedureName.Name.Value, out parameterPositions)) {
					foreach (int parameterPosition in parameterPositions.Where(p => this.parameters.Count > p)) {
						ExecuteParameter<Literal> objectNameParameter = (ExecuteParameter<Literal>)this.parameters[parameterPosition];
						if ((objectNameParameter != null) && (objectNameParameter.Value is StringLiteral)) {
							this.parameters[parameterPosition] = new ExecuteParameterObjectName(objectNameParameter.ParameterName, ((StringLiteral)objectNameParameter.Value), objectNameParameter.Output);
						}
					}
				}
			}
		}
		public CreateXmlSchemaCollectionStatement(Qualified<SchemaName, XmlSchemaCollectionName> xmlSchemaCollectionName, VariableName variable): this(xmlSchemaCollectionName, ExpressionValue<VariableName>.CreateFrom(variable)) {}
		public SetVariableMethodStatement(VariableName variableName, Sequence<NamedFunction> methods): base(variableName) {
			this.methods = methods.ToList();
		}
		public UpdateExpressionItem(VariableName variableName, Expression expression): this(variableName, null, expression) {}
		public UpdateExpressionItem(VariableName variableName, Qualified<SqlName, ColumnName> columnName, Expression expression): base(columnName, variableName) {
			this.expression = expression;
		}
Ejemplo n.º 7
0
		public ColumnVariableItem(VariableName variableName, Expression expression) {
			Debug.Assert(expression != null);
			Debug.Assert(variableName != null);
			this.variableName = variableName;
			this.expression = expression;
		}
Ejemplo n.º 8
0
		public CursorName(VariableName variableName): this(variableName.Value, false, false) {}
		public DeclareVariableItem(VariableName variable, Qualified<SchemaName, TypeName> typeName, Expression initialization): base(variable) {
			Debug.Assert(typeName != null);
			this.typeName = typeName;
			this.initialization = initialization;
		}
		public SourceVariableNodesRowset(VariableName variableName, NamedFunction functionCall, RowsetAlias rowsetAlias): base(functionCall, rowsetAlias) {
			this.variableName = variableName;
		}
Ejemplo n.º 11
0
		public OpenxmlFunction(VariableName variableName, SqlScriptableToken stringValue, Optional<OpenxmlSchema> schema): this(variableName, stringValue, null, schema) {}
Ejemplo n.º 12
0
		protected DeclareItem(VariableName variableName) {
			Debug.Assert(variableName != null);
			this.variableName = variableName;
		}
		public DeclareTableStatement(VariableName variableName, Sequence<TableDefinition> tableDefinitions) {
			Debug.Assert(variableName != null);
			this.variableName = variableName;
			this.tableDefinitions = tableDefinitions.ToList();
		}
Ejemplo n.º 14
0
		private UpdateMethodItem(VariableName variableName, Qualified<SqlName, ColumnName> columnName, Sequence<NamedFunction> methods): base(columnName, variableName) {
			this.methods = methods.ToList();
		}
Ejemplo n.º 15
0
		public UpdateMethodItem(VariableName variableName, Sequence<NamedFunction> methods): this(variableName, null, methods) {}
Ejemplo n.º 16
0
		public DeclareCursorItem(VariableName variable): base(variable) {}
		public SourceTableVariableNodesRowset(VariableName tableName, ColumnName columnName, NamedFunction functionCall, RowsetAlias rowsetAlias): base(functionCall, rowsetAlias) {
			Debug.Assert(tableName != null);
			Debug.Assert(columnName != null);
			this.tableName = tableName;
			this.columnName = columnName;
		}
Ejemplo n.º 18
0
		public DeclareVariableItem(VariableName variable, Qualified<SchemaName, TypeName> typeName): this(variable, typeName, null) {}
		public SourceTableVariableRowset(VariableName tableName, RowsetAlias rowsetAlias): base(rowsetAlias) {
			Debug.Assert(tableName != null);
			this.tableName = tableName;
		}
Ejemplo n.º 20
0
		protected UpdateItem(Qualified<SqlName, ColumnName> columnName, VariableName variableName) {
			Debug.Assert((columnName == null)^(variableName == null));
			this.columnName = columnName;
			this.variableName = variableName;
		}
		public SetVariableCursorStatement(VariableName variableName, CursorDefinition definition): base(variableName) {
			if (definition.Global) {
				throw new ArgumentException("GLOBAL not allowed here");
			}
			this.definition = definition;
		}
		public SetVariableExpressionStatement(VariableName variableName, Expression expression): base(variableName) {
			this.expression = expression;
		}
		protected SetVariableStatement(VariableName variableName) {
			this.variableName = variableName;
			Debug.Assert(variableName != null);
		}