DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
QueryContextExtensions.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2015 Deveel
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 using System;
18 
19 using Deveel.Data.Security;
20 using Deveel.Data.Sql;
21 using Deveel.Data.Sql.Query;
23 
24 namespace Deveel.Data {
25  public static class QueryContextExtensions {
26  #region Properties
27 
28  public static bool IgnoreIdentifiersCase(this IQueryContext context) {
29  return context.SessionContext.TransactionContext.IgnoreIdentifiersCase();
30  }
31 
32  public static void IgnoreIdentifiersCase(this IQueryContext context, bool value) {
33  context.SessionContext.TransactionContext.IgnoreIdentifiersCase(value);
34  }
35 
36  public static void AutoCommit(this IQueryContext context, bool value) {
37  context.SessionContext.TransactionContext.AutoCommit(value);
38  }
39 
40  public static bool AutoCommit(this IQueryContext context) {
41  return context.SessionContext.TransactionContext.AutoCommit();
42  }
43 
44  public static string CurrentSchema(this IQueryContext context) {
45  return context.SessionContext.TransactionContext.CurrentSchema();
46  }
47 
48  public static void CurrentSchema(this IQueryContext context, string value) {
49  context.SessionContext.TransactionContext.CurrentSchema(value);
50  }
51 
52  public static void ParameterStyle(this IQueryContext context, QueryParameterStyle value) {
53  context.SessionContext.TransactionContext.ParameterStyle(value);
54  }
55 
56  public static QueryParameterStyle ParameterStyle(this IQueryContext context) {
57  return context.SessionContext.TransactionContext.ParameterStyle();
58  }
59 
60  public static ISystemContext SystemContext(this IQueryContext context) {
62  }
63 
64  #endregion
65  }
66 }
static void IgnoreIdentifiersCase(this IQueryContext context, bool value)
static bool AutoCommit(this IQueryContext context)
ISessionContext SessionContext
static string CurrentSchema(this IQueryContext context)
The execution context of a database system, that is defining the configurations and the components us...
Provides a context for executing queries, accessing the system resources and evaluation context...
static QueryParameterStyle ParameterStyle(this IQueryContext context)
static void CurrentSchema(this IQueryContext context, string value)
QueryParameterStyle
In a SQL query object, this is the form of parameters passed from the client side to the server side...
static void AutoCommit(this IQueryContext context, bool value)
static bool IgnoreIdentifiersCase(this IQueryContext context)
static ISystemContext SystemContext(this IQueryContext context)
ITransactionContext TransactionContext
static void ParameterStyle(this IQueryContext context, QueryParameterStyle value)
ISystemContext SystemContext
Gets the context of the database system that handles this database.