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

Classes

class  QueryParameterCollection
 

Public Member Functions

 SqlQuery (string text)
 
 SqlQuery (string text, QueryParameterStyle parameterStyle)
 

Package Functions

void ChangeStyle (QueryParameterStyle style)
 

Properties

string Text [get, private set]
 
ICollection< QueryParameterParameters [get, private set]
 
QueryParameterStyle ParameterStyle [get, private set]
 

Private Member Functions

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

Detailed Description

Definition at line 26 of file SqlQuery.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.SqlQuery.SqlQuery ( string  text)
inline

Definition at line 27 of file SqlQuery.cs.

28  : this(text, QueryParameterStyle.Default) {
29  }
QueryParameterStyle
In a SQL query object, this is the form of parameters passed from the client side to the server side...
Deveel.Data.Sql.SqlQuery.SqlQuery ( string  text,
QueryParameterStyle  parameterStyle 
)
inline

Definition at line 31 of file SqlQuery.cs.

31  {
32  Text = text;
33  ParameterStyle = parameterStyle;
34  Parameters = new QueryParameterCollection(this);
35  }
QueryParameterStyle ParameterStyle
Definition: SqlQuery.cs:55
ICollection< QueryParameter > Parameters
Definition: SqlQuery.cs:53
Deveel.Data.Sql.SqlQuery.SqlQuery ( ObjectData  data)
inlineprivate

Definition at line 37 of file SqlQuery.cs.

37  {
38  Text = data.GetString("Text");
39  ParameterStyle = (QueryParameterStyle) data.GetInt32("ParameterStyle");
40 
41  Parameters = new QueryParameterCollection(this);
42 
43  var parameters = data.GetValue<QueryParameter[]>("Parameters");
44  if (parameters != null) {
45  foreach (var parameter in parameters) {
46  Parameters.Add(parameter);
47  }
48  }
49  }
QueryParameterStyle ParameterStyle
Definition: SqlQuery.cs:55
QueryParameterStyle
In a SQL query object, this is the form of parameters passed from the client side to the server side...
ICollection< QueryParameter > Parameters
Definition: SqlQuery.cs:53

Member Function Documentation

void Deveel.Data.Sql.SqlQuery.ChangeStyle ( QueryParameterStyle  style)
inlinepackage

Definition at line 66 of file SqlQuery.cs.

66  {
67  if (ParameterStyle != QueryParameterStyle.Default)
68  throw new InvalidOperationException();
69  if (style == QueryParameterStyle.Default)
70  throw new ArgumentException();
71 
72  ParameterStyle = style;
73  }
QueryParameterStyle ParameterStyle
Definition: SqlQuery.cs:55
QueryParameterStyle
In a SQL query object, this is the form of parameters passed from the client side to the server side...
void ISerializable. Deveel.Data.Sql.SqlQuery.GetData ( SerializeData  data)
inlineprivate

Implements Deveel.Data.Serialization.ISerializable.

Definition at line 57 of file SqlQuery.cs.

57  {
58  data.SetValue("Text", Text);
59  data.SetValue("ParameterStyle", (int)ParameterStyle);
60 
61  var parameters = Parameters.ToArray();
62  if (parameters.Length > 0)
63  data.SetValue("Parameters", parameters);
64  }
QueryParameterStyle ParameterStyle
Definition: SqlQuery.cs:55
void SetValue(string key, Type type, object value)
ICollection< QueryParameter > Parameters
Definition: SqlQuery.cs:53

Property Documentation

ICollection<QueryParameter> Deveel.Data.Sql.SqlQuery.Parameters
getprivate set

Definition at line 53 of file SqlQuery.cs.

QueryParameterStyle Deveel.Data.Sql.SqlQuery.ParameterStyle
getprivate set

Definition at line 55 of file SqlQuery.cs.

string Deveel.Data.Sql.SqlQuery.Text
getprivate set

Definition at line 51 of file SqlQuery.cs.


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