DeveelDB
20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
deveeldb.git
src
deveeldb
Deveel.Data
QueryContextBase.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
#if !PCL
19
using
System
.Security.Cryptography;
20
#endif
21
22
using
Deveel
.
Data
.
Caching
;
23
using
Deveel
.
Data
.
Services
;
24
using
Deveel
.
Data
.
Transactions
;
25
26
namespace
Deveel
.Data {
27
public
sealed
class
QueryContext
:
Context
,
IQueryContext
{
28
/*
29
#if PCL
30
private Random secureRandom;
31
#else
32
private RNGCryptoServiceProvider secureRandom;
33
#endif
34
*/
35
36
internal
QueryContext
(
ISessionContext
parentContext)
37
: base(parentContext) {
38
39
this.RegisterInstance<IQueryContext>(
this
);
40
/*
41
#if PCL
42
secureRandom = new Random();
43
#else
44
secureRandom = new RNGCryptoServiceProvider();
45
#endif
46
*/
47
48
this.RegisterInstance<ICache>(
new
MemoryCache
(),
"TableCache"
);
49
}
50
51
public
ISessionContext
SessionContext
{
52
get
{
return
(
ISessionContext
)ParentContext; }
53
}
54
55
protected
override
string
ContextName {
56
get
{
return
ContextNames
.
Query
; }
57
}
58
59
public
IBlockContext
CreateBlockContext
() {
60
return
new
BlockContext
(
this
);
61
}
62
63
/*
64
public virtual SqlNumber NextRandom(int bitSize) {
65
AssertNotDisposed();
66
67
#if PCL
68
var num = secureRandom.NextDouble();
69
#else
70
var bytes = new byte[8];
71
secureRandom.GetBytes(bytes);
72
var num = BitConverter.ToInt64(bytes, 0);
73
#endif
74
return new SqlNumber(num);
75
}
76
*/
77
78
}
79
}
Deveel.Data.ISessionContext
Definition:
ISessionContext.cs:23
Deveel.Data.Caching
Definition:
Cache.cs:21
Deveel
System
Definition:
NonSerializedAttribute.cs:3
Deveel.Data.IBlockContext
Definition:
IBlockContext.cs:20
Deveel.Data.Context
Definition:
Context.cs:22
Deveel.Data.IQueryContext
Provides a context for executing queries, accessing the system resources and evaluation context...
Definition:
IQueryContext.cs:26
Deveel.Data.ContextNames.Query
const string Query
Definition:
ContextNames.cs:25
Deveel.Data.QueryContext.QueryContext
QueryContext(ISessionContext parentContext)
Definition:
QueryContextBase.cs:36
Deveel.Data.Caching.MemoryCache
Definition:
MemoryCache.cs:21
Deveel.Data.Services
Definition:
IRegistrationConfiguration.cs:19
Deveel.Data.BlockContext
Definition:
BlockContext.cs:22
Deveel.Data
Definition:
ActiveSessionList.cs:22
Deveel.Data.QueryContext
Definition:
QueryContextBase.cs:27
Deveel.Data.Transactions
Definition:
AccessType.cs:19
Deveel.Data.SessionContext
Definition:
SessionContext.cs:23
Deveel.Data.ContextNames
Definition:
ContextNames.cs:20
Deveel.Data.QueryContext.CreateBlockContext
IBlockContext CreateBlockContext()
Definition:
QueryContextBase.cs:59
Generated by
1.8.10