|
| DeveelDbExecutor (IQuery context) |
|
override object | Convert (object value, Type type) |
|
override IEnumerable< T > | Execute< T > (QueryCommand command, Func< FieldReader, T > fnProjector, MappingEntity entity, object[] paramValues) |
|
override IEnumerable< int > | ExecuteBatch (QueryCommand query, IEnumerable< object[]> paramSets, int batchSize, bool stream) |
|
override IEnumerable< T > | ExecuteBatch< T > (QueryCommand query, IEnumerable< object[]> paramSets, Func< FieldReader, T > fnProjector, MappingEntity entity, int batchSize, bool stream) |
|
override IEnumerable< T > | ExecuteDeferred< T > (QueryCommand command, Func< FieldReader, T > fnProjector, MappingEntity entity, object[] paramValues) |
|
override int | ExecuteCommand (QueryCommand query, object[] paramValues) |
|
Definition at line 17 of file DeveelDbExecutor.cs.
Deveel.Data.Linq.DeveelDbExecutor.DeveelDbExecutor |
( |
IQuery |
context | ) |
|
|
inline |
void Deveel.Data.Linq.DeveelDbExecutor.AddParameter |
( |
SqlQuery |
query, |
|
|
QueryParameter |
queryParameter, |
|
|
object |
value |
|
) |
| |
|
inlineprivate |
Definition at line 74 of file DeveelDbExecutor.cs.
76 var param =
new Sql.QueryParameter(queryParameter.
Name, sqlType, (
ISqlObject)value);
Defines the contract for a valid SQL Object
ICollection< QueryParameter > Parameters
SqlType GetSqlType(Type type)
override object Deveel.Data.Linq.DeveelDbExecutor.Convert |
( |
object |
value, |
|
|
Type |
type |
|
) |
| |
|
inline |
Definition at line 25 of file DeveelDbExecutor.cs.
27 return TypeHelper.GetDefault(type);
30 type = TypeHelper.GetNonNullableType(type);
31 var vtype = value.GetType();
35 if (vtype == typeof (
string))
36 return Enum.Parse(type, (
string) value);
38 Type utype = Enum.GetUnderlyingType(type);
40 value =
System.Convert.ChangeType(value, utype);
42 return Enum.ToObject(type, value);
45 return System.Convert.ChangeType(value, type);
A user-defined TYPE that holds complex objects in a database column.
override IEnumerable<T> Deveel.Data.Linq.DeveelDbExecutor.Execute< T > |
( |
QueryCommand |
command, |
|
|
Func< FieldReader, T > |
fnProjector, |
|
|
MappingEntity |
entity, |
|
|
object[] |
paramValues |
|
) |
| |
|
inline |
Definition at line 85 of file DeveelDbExecutor.cs.
86 var query =
GetQuery(command, paramValues);
87 var queryResult =
context.ExecuteQuery(query);
89 return Project(queryResult[0], fnProjector, entity);
SqlQuery GetQuery(QueryCommand command, object[] paramValues)
override IEnumerable<int> Deveel.Data.Linq.DeveelDbExecutor.ExecuteBatch |
( |
QueryCommand |
query, |
|
|
IEnumerable< object[]> |
paramSets, |
|
|
int |
batchSize, |
|
|
bool |
stream |
|
) |
| |
|
inline |
override int Deveel.Data.Linq.DeveelDbExecutor.ExecuteCommand |
( |
QueryCommand |
query, |
|
|
object[] |
paramValues |
|
) |
| |
|
inline |
Definition at line 115 of file DeveelDbExecutor.cs.
116 var sqlQuery =
GetQuery(query, paramValues);
117 var result =
context.ExecuteQuery(sqlQuery);
SqlQuery GetQuery(QueryCommand command, object[] paramValues)
override IEnumerable<T> Deveel.Data.Linq.DeveelDbExecutor.ExecuteDeferred< T > |
( |
QueryCommand |
command, |
|
|
Func< FieldReader, T > |
fnProjector, |
|
|
MappingEntity |
entity, |
|
|
object[] |
paramValues |
|
) |
| |
|
inline |
Definition at line 108 of file DeveelDbExecutor.cs.
109 var query =
GetQuery(command, paramValues);
110 var queryResult =
context.ExecuteQuery(query);
112 return Project(queryResult[0], fnProjector, entity);
SqlQuery GetQuery(QueryCommand command, object[] paramValues)
SqlQuery Deveel.Data.Linq.DeveelDbExecutor.GetQuery |
( |
QueryCommand |
command, |
|
|
object[] |
paramValues |
|
) |
| |
|
inlineprivate |
Definition at line 51 of file DeveelDbExecutor.cs.
52 var query =
new SqlQuery(command.CommandText);
void SetParameters(QueryCommand command, SqlQuery query, object[] paramValues)
SqlType Deveel.Data.Linq.DeveelDbExecutor.GetSqlType |
( |
Type |
type | ) |
|
|
inlineprivate |
IEnumerable<T> Deveel.Data.Linq.DeveelDbExecutor.Project< T > |
( |
ITable |
result, |
|
|
Func< FieldReader, T > |
fnProjector, |
|
|
MappingEntity |
entity |
|
) |
| |
|
inlineprivate |
Definition at line 92 of file DeveelDbExecutor.cs.
93 var reader =
new TableFieldReader(result);
94 while (reader.NextRow()) {
95 yield
return fnProjector(reader);
void Deveel.Data.Linq.DeveelDbExecutor.SetParameters |
( |
QueryCommand |
command, |
|
|
SqlQuery |
query, |
|
|
object[] |
paramValues |
|
) |
| |
|
inlineprivate |
Definition at line 57 of file DeveelDbExecutor.cs.
58 if (command.Parameters.Count > 0 && query.
Parameters.Count == 0) {
59 for (
int i = 0, n = command.Parameters.Count; i < n; i++) {
62 }
else if (paramValues != null) {
64 for (
int i = 0, n = queryParams.Count; i < n; i++) {
65 var p = queryParams[i];
static readonly SqlNull Value
Defines the contract for a valid SQL Object
void AddParameter(SqlQuery query, QueryParameter queryParameter, object value)
ICollection< QueryParameter > Parameters
IQuery Deveel.Data.Linq.DeveelDbExecutor.context |
|
private |
int Deveel.Data.Linq.DeveelDbExecutor.rowsAffected |
|
private |
override int Deveel.Data.Linq.DeveelDbExecutor.RowsAffected |
|
get |
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb-linq/Deveel.Data.Linq/DeveelDbExecutor.cs