DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Static Public Member Functions | List of all members
Deveel.Data.Sql.Statements.QueryExtensions Class Reference

Static Public Member Functions

static ITable[] ExecuteQuery (this IQuery query, SqlQuery sqlQuery)
 
static ITable[] ExecuteQuery (this IQuery query, string sqlSource, params QueryParameter[] parameters)
 
static ITable[] ExecuteQuery (this IQuery query, string sqlSource)
 
static ITable ExecuteCreateView (this IQuery query, string viewName, string querySource)
 
static ITable ExecuteCreateView (this IQuery query, string viewName, IEnumerable< string > columnNames, string querySource)
 
static ITable ExecuteCreateView (this IQuery query, string viewName, SqlQueryExpression queryExpression)
 
static ITable ExecuteCreateView (this IQuery query, string viewName, IEnumerable< string > columnNames, SqlQueryExpression queryExpression)
 

Detailed Description

Definition at line 24 of file QueryExtensions.cs.

Member Function Documentation

static ITable Deveel.Data.Sql.Statements.QueryExtensions.ExecuteCreateView ( this IQuery  query,
string  viewName,
string  querySource 
)
inlinestatic

Definition at line 48 of file QueryExtensions.cs.

48  {
49  return ExecuteCreateView(query, viewName, new string[0], querySource);
50  }
static ITable ExecuteCreateView(this IQuery query, string viewName, string querySource)
static ITable Deveel.Data.Sql.Statements.QueryExtensions.ExecuteCreateView ( this IQuery  query,
string  viewName,
IEnumerable< string >  columnNames,
string  querySource 
)
inlinestatic

Definition at line 52 of file QueryExtensions.cs.

52  {
53  var expression = SqlExpression.Parse(querySource);
54  if (expression.ExpressionType != SqlExpressionType.Query)
55  throw new ArgumentException("The input query string is invalid.", "querySource");
56 
57  return query.ExecuteCreateView(viewName, columnNames, (SqlQueryExpression)expression);
58  }
static SqlExpression Parse(string s)
Parses the given SQL string to an expression that can be evaluated.
SqlExpressionType
All the possible type of SqlExpression supported
Defines the base class for instances that represent SQL expression tree nodes.
static ITable Deveel.Data.Sql.Statements.QueryExtensions.ExecuteCreateView ( this IQuery  query,
string  viewName,
SqlQueryExpression  queryExpression 
)
inlinestatic

Definition at line 60 of file QueryExtensions.cs.

60  {
61  return ExecuteCreateView(query, viewName, new string[0], queryExpression);
62  }
static ITable ExecuteCreateView(this IQuery query, string viewName, string querySource)
static ITable Deveel.Data.Sql.Statements.QueryExtensions.ExecuteCreateView ( this IQuery  query,
string  viewName,
IEnumerable< string >  columnNames,
SqlQueryExpression  queryExpression 
)
inlinestatic

Definition at line 64 of file QueryExtensions.cs.

65  {
66  var statement = new CreateViewStatement(viewName, columnNames, queryExpression);
67  return statement.Execute(query);
68  }
static ITable [] Deveel.Data.Sql.Statements.QueryExtensions.ExecuteQuery ( this IQuery  query,
SqlQuery  sqlQuery 
)
inlinestatic

Definition at line 25 of file QueryExtensions.cs.

25  {
26  return StatementExecutor.Execute(query, sqlQuery);
27  }
static ITable [] Deveel.Data.Sql.Statements.QueryExtensions.ExecuteQuery ( this IQuery  query,
string  sqlSource,
params QueryParameter[]  parameters 
)
inlinestatic

Definition at line 29 of file QueryExtensions.cs.

29  {
30  var sqlQuery = new SqlQuery(sqlSource);
31  if (parameters != null) {
32  foreach (var parameter in parameters) {
33  sqlQuery.Parameters.Add(parameter);
34  }
35  }
36 
37  return query.ExecuteQuery(sqlQuery);
38  }
static ITable [] Deveel.Data.Sql.Statements.QueryExtensions.ExecuteQuery ( this IQuery  query,
string  sqlSource 
)
inlinestatic

Definition at line 40 of file QueryExtensions.cs.

40  {
41  return query.ExecuteQuery(sqlSource, null);
42  }

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