DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
VariableInfo.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2015 Deveel
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 using System;
18 
20 using Deveel.Data.Types;
21 
22 namespace Deveel.Data.Sql.Variables {
23  public sealed class VariableInfo : IObjectInfo {
24  public VariableInfo(string variableName, SqlType type, bool isConstant) {
25  if (String.IsNullOrEmpty(variableName))
26  throw new ArgumentNullException("variableName");
27  if (type == null)
28  throw new ArgumentNullException("type");
29 
30  VariableName = variableName;
31  Type = type;
32  IsConstant = isConstant;
33  }
34 
35  public string VariableName { get; private set; }
36 
37  public SqlType Type { get; private set; }
38 
39  public bool IsConstant { get; private set; }
40 
41  public bool IsNotNull { get; set; }
42 
43  public SqlExpression DefaultExpression { get; set; }
44 
46  get { return DbObjectType.Variable; }
47  }
48 
50  get { return new ObjectName(VariableName); }
51  }
52  }
53 }
A long string in the system.
Describes the name of an object within a database.
Definition: ObjectName.cs:44
A user-defined TYPE that holds complex objects in a database column.
Defines the properties of a specific SQL Type and handles the values compatible.
Definition: SqlType.cs:33
Defines the base class for instances that represent SQL expression tree nodes.
DbObjectType
The kind of objects that can be handled by a database system and its managers
Definition: DbObjectType.cs:27
VariableInfo(string variableName, SqlType type, bool isConstant)
Definition: VariableInfo.cs:24