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

Public Member Functions

 QueryParameter (SqlType sqlType)
 
 QueryParameter (SqlType sqlType, ISqlObject value)
 
 QueryParameter (string name, SqlType sqlType)
 
 QueryParameter (string name, SqlType sqlType, ISqlObject value)
 

Public Attributes

const char NamePrefix = ':'
 
const string Marker = "?"
 

Properties

string Name [get, private set]
 
SqlType SqlType [get, private set]
 
QueryParameterDirection Direction [get, set]
 
ISqlObject Value [get, set]
 

Private Member Functions

 QueryParameter (ObjectData data)
 
void ISerializable. GetData (SerializeData data)
 

Detailed Description

Definition at line 26 of file QueryParameter.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.QueryParameter.QueryParameter ( SqlType  sqlType)
inline

Definition at line 27 of file QueryParameter.cs.

28  : this(sqlType, null) {
29  }
Deveel.Data.Sql.QueryParameter.QueryParameter ( SqlType  sqlType,
ISqlObject  value 
)
inline

Definition at line 31 of file QueryParameter.cs.

32  : this(Marker, sqlType, value) {
33  }
Deveel.Data.Sql.QueryParameter.QueryParameter ( string  name,
SqlType  sqlType 
)
inline

Definition at line 35 of file QueryParameter.cs.

36  : this(name, sqlType, null) {
37  }
Deveel.Data.Sql.QueryParameter.QueryParameter ( string  name,
SqlType  sqlType,
ISqlObject  value 
)
inline

Definition at line 39 of file QueryParameter.cs.

39  {
40  if (sqlType == null)
41  throw new ArgumentNullException("sqlType");
42 
43  if (String.IsNullOrEmpty(name))
44  throw new ArgumentNullException("name");
45 
46  if (!String.Equals(name, Marker, StringComparison.Ordinal) &&
47  name[0] != NamePrefix)
48  throw new ArgumentException(String.Format("The parameter name '{0}' is invalid: must be '{1}' or starting with '{2}'", name, Marker, NamePrefix));
49 
50  Name = name;
51  SqlType = sqlType;
52  Value = value;
54  }
A long string in the system.
QueryParameterDirection Direction
Defines the properties of a specific SQL Type and handles the values compatible.
Definition: SqlType.cs:33
Deveel.Data.Sql.QueryParameter.QueryParameter ( ObjectData  data)
inlineprivate

Definition at line 56 of file QueryParameter.cs.

56  {
57  Name = data.GetString("Name");
58  SqlType = data.GetValue<SqlType>("Type");
59  Value = data.GetValue<ISqlObject>("Value");
60  Direction = (QueryParameterDirection) data.GetInt32("Direction");
61  }
Defines the contract for a valid SQL Object
Definition: ISqlObject.cs:23
QueryParameterDirection Direction
Defines the properties of a specific SQL Type and handles the values compatible.
Definition: SqlType.cs:33

Member Function Documentation

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

Implements Deveel.Data.Serialization.ISerializable.

Definition at line 74 of file QueryParameter.cs.

74  {
75  data.SetValue("Name", Name);
76  data.SetValue("Type", SqlType);
77  data.SetValue("Direction", Direction);
78  data.SetValue("Value", Value);
79  }
void SetValue(string key, Type type, object value)
QueryParameterDirection Direction
Defines the properties of a specific SQL Type and handles the values compatible.
Definition: SqlType.cs:33

Member Data Documentation

const string Deveel.Data.Sql.QueryParameter.Marker = "?"

Definition at line 64 of file QueryParameter.cs.

const char Deveel.Data.Sql.QueryParameter.NamePrefix = ':'

Definition at line 63 of file QueryParameter.cs.

Property Documentation

QueryParameterDirection Deveel.Data.Sql.QueryParameter.Direction
getset

Definition at line 70 of file QueryParameter.cs.

string Deveel.Data.Sql.QueryParameter.Name
getprivate set

Definition at line 66 of file QueryParameter.cs.

SqlType Deveel.Data.Sql.QueryParameter.SqlType
getprivate set

Definition at line 68 of file QueryParameter.cs.

ISqlObject Deveel.Data.Sql.QueryParameter.Value
getset

Definition at line 72 of file QueryParameter.cs.


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