DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | Private Member Functions | List of all members
Deveel.Data.Sql.Statements.SqlTableColumn Class Reference
Inheritance diagram for Deveel.Data.Sql.Statements.SqlTableColumn:
Deveel.Data.Sql.Expressions.IPreparable Deveel.Data.Serialization.ISerializable

Public Member Functions

 SqlTableColumn (string columnName, SqlType columnType)
 

Properties

string ColumnName [get, private set]
 
SqlType ColumnType [get, private set]
 
bool IsIdentity [get, set]
 
SqlExpression DefaultExpression [get, set]
 
bool HasDefaultExpression [get]
 
bool IsNotNull [get, set]
 

Private Member Functions

 SqlTableColumn (ObjectData data)
 
object IPreparable. Prepare (IExpressionPreparer preparer)
 Converts the underlying value of this instance into an object that can be evaluated by an expression. More...
 
void ISerializable. GetData (SerializeData data)
 

Detailed Description

Definition at line 26 of file SqlTableColumn.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Statements.SqlTableColumn.SqlTableColumn ( string  columnName,
SqlType  columnType 
)
inline

Definition at line 27 of file SqlTableColumn.cs.

27  {
28  if (String.IsNullOrEmpty(columnName))
29  throw new ArgumentNullException("columnName");
30  if (columnType == null)
31  throw new ArgumentNullException("columnType");
32 
33  ColumnName = columnName;
34  ColumnType = columnType;
35  }
A long string in the system.
Deveel.Data.Sql.Statements.SqlTableColumn.SqlTableColumn ( ObjectData  data)
inlineprivate

Definition at line 37 of file SqlTableColumn.cs.

37  {
38  ColumnName = data.GetString("ColumnName");
39  ColumnType = data.GetValue<SqlType>("ColumnType");
40  IsIdentity = data.GetBoolean("IsIdentity");
41  IsNotNull = data.GetBoolean("IsNotNull");
42  DefaultExpression = data.GetValue<SqlExpression>("Default");
43  }
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.

Member Function Documentation

void ISerializable. Deveel.Data.Sql.Statements.SqlTableColumn.GetData ( SerializeData  data)
inlineprivate

Implements Deveel.Data.Serialization.ISerializable.

Definition at line 90 of file SqlTableColumn.cs.

90  {
91  data.SetValue("ColumnName", ColumnName);
92  data.SetValue("ColumnType", ColumnType);
93  data.SetValue("IsNotNull", IsNotNull);
94  data.SetValue("IsIdentity", IsIdentity);
95  data.SetValue("Default", DefaultExpression);
96  }
void SetValue(string key, Type type, object value)
object IPreparable. Deveel.Data.Sql.Statements.SqlTableColumn.Prepare ( IExpressionPreparer  preparer)
inlineprivate

Converts the underlying value of this instance into an object that can be evaluated by an expression.

Parameters
preparerThe context used to prepare this object.
Returns
Returns an object that can be evaluated by an expression.

Implements Deveel.Data.Sql.Expressions.IPreparable.

Definition at line 59 of file SqlTableColumn.cs.

59  {
60  var column = new SqlTableColumn(ColumnName, ColumnType);
61  if (DefaultExpression != null)
62  column.DefaultExpression = DefaultExpression.Prepare(preparer);
63 
64  column.IsNotNull = IsNotNull;
65  return column;
66  }
SqlTableColumn(string columnName, SqlType columnType)
virtual SqlExpression Prepare(IExpressionPreparer preparer)

Property Documentation

string Deveel.Data.Sql.Statements.SqlTableColumn.ColumnName
getprivate set

Definition at line 45 of file SqlTableColumn.cs.

SqlType Deveel.Data.Sql.Statements.SqlTableColumn.ColumnType
getprivate set

Definition at line 47 of file SqlTableColumn.cs.

SqlExpression Deveel.Data.Sql.Statements.SqlTableColumn.DefaultExpression
getset

Definition at line 51 of file SqlTableColumn.cs.

bool Deveel.Data.Sql.Statements.SqlTableColumn.HasDefaultExpression
get

Definition at line 53 of file SqlTableColumn.cs.

bool Deveel.Data.Sql.Statements.SqlTableColumn.IsIdentity
getset

Definition at line 49 of file SqlTableColumn.cs.

bool Deveel.Data.Sql.Statements.SqlTableColumn.IsNotNull
getset

Definition at line 57 of file SqlTableColumn.cs.


The documentation for this class was generated from the following file: