DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Classes | Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes | List of all members
Deveel.Data.Protocol.ServerConnector Class Referenceabstract
Inheritance diagram for Deveel.Data.Protocol.ServerConnector:
Deveel.Data.Protocol.IServerConnector Deveel.Data.Protocol.IServerConnector Deveel.Data.Protocol.IConnector Deveel.Data.Protocol.IConnector Deveel.Data.Protocol.EmbeddedServerConnector Deveel.Data.Protocol.LocalDatabaseClient.ServerConnector

Classes

class  DirectStreamableObjectChannel
 
class  QueryResponse
 
class  ServerMessageProcessor
 
class  TriggerChannel
 

Public Member Functions

void Dispose ()
 
abstract ConnectionEndPoint MakeEndPoint (IDictionary< string, object > properties)
 
ILargeObjectChannel CreateObjectChannel (long objectId)
 
ITriggerChannel CreateTriggerChannel (string triggerName, string objectName, TriggerEventType eventType)
 
abstract ConnectionEndPoint MakeEndPoint (IDictionary< string, object > properties)
 
void Dispose ()
 

Protected Member Functions

 ServerConnector (IDatabaseHandler databaseHandler)
 
virtual void Dispose (bool disposing)
 
void SetAutoCommit (bool value)
 
void SetParameterStyle (QueryParameterStyle parameterStyle)
 
void SetIgnoreIdentifiersCase (bool value)
 
void ChangeState (ConnectorState newState)
 
void OpenConnector (ConnectionEndPoint remoteEndPoint, string databaseName)
 
virtual void OnConnectorOpen ()
 
void CloseConnector ()
 
virtual void OnCloseConnector ()
 
virtual EncryptionData GetEncryptionData ()
 
virtual bool Authenticate (string defaultSchema, string username, string password)
 
virtual bool OnAuthenticated (User user)
 
IQueryResponse[] ExecuteQuery (long commitId, string text, IEnumerable< QueryParameter > parameters)
 
virtual IQueryResponse[] ExecuteQuery (IQuery context, string text, IEnumerable< QueryParameter > parameters)
 
IQueryResponse[] CoreExecuteQuery (IQuery context, string text, IEnumerable< QueryParameter > parameters)
 
int BeginTransaction ()
 
abstract IServerMessageEnvelope CreateEnvelope (IDictionary< string, object > metadata, IMessage message)
 
virtual IMessage GetMessage (IMessageEnvelope envelope)
 
void CommitTransaction (int commitId)
 
void RollbackTransaction (int commitId)
 
QueryResultPart GetResultPart (int resultId, int startRow, int countRows)
 
QueryResult GetResult (int resultId)
 
 ServerConnector (IDatabaseHandler handler)
 
void ChangeState (ConnectorState newState)
 
void OpenConnector (ConnectionEndPoint remoteEndPoint, string databaseName)
 
virtual void OnConnectorOpen ()
 
void SetAutoCommit (bool state)
 
void SetIgnoreIdentifiersCase (bool state)
 
void SetParameterStyle (ParameterStyle style)
 
void CloseConnector ()
 
virtual void OnCloseConnector ()
 
virtual EncryptionData GetEncryptionData ()
 
virtual AuthenticatedSession OnAuthenticate (string defaultSchema, string username, string password)
 
virtual void OnTriggerFired (string triggerName, string triggerSource, TriggerEventType eventType, int count)
 
int BeginTransaction ()
 
virtual bool Authenticate (string defaultSchema, string username, string password)
 
long CreateStreamableObject (ReferenceType referenceType, long length)
 
IQueryResponse[] CoreExecuteQuery (string text, IEnumerable< SqlQueryParameter > parameters)
 
virtual IQueryResponse[] ExecuteQuery (string text, IEnumerable< SqlQueryParameter > parameters)
 
QueryResultPart GetResultPart (int resultId, int startRow, int countRows)
 
void DisposeResult (int resultId)
 
void CommitTransaction (int transactionId)
 
void RollbackTransaction (int transactionId)
 
abstract IServerMessageEnvelope CreateEnvelope (IDictionary< string, object > metadata, IMessage message)
 
virtual IMessage GetMessage (IMessageEnvelope envelope)
 
virtual IStreamableObjectChannel CreateObjectChannel (long objectId)
 
virtual ITriggerChannel CreateTriggerChannel (string triggerName, string objectName, TriggerEventType eventType)
 
virtual void Dispose (bool disposing)
 

Properties

IDatabaseHandler DatabaseHandler [get, private set]
 
IDatabase Database [get, private set]
 
abstract ConnectionEndPoint LocalEndPoint [get]
 
ConnectionEndPoint RemoteEndPoint [get, private set]
 
User User [get, private set]
 
IDictionary< string, object > Metadata [get, private set]
 
ConnectorState CurrentState [get, private set]
 
AuthenticatedSession Session [get, protected set]
 
ILogger Logger [get]
 
- Properties inherited from Deveel.Data.Protocol.IConnector
ConnectorState CurrentState [get]
 
ConnectionEndPoint LocalEndPoint [get]
 

Private Member Functions

 ~ServerConnector ()
 
void AssertNotDisposed ()
 
void AssertAuthenticated ()
 
void ClearResults ()
 
IQuery OpenQueryContext (long commitId)
 
IQuery CreateQueryContext ()
 
void DisposeResult (int resultId)
 
int AddResult (QueryResult result)
 
IMessageProcessor IConnector. CreateProcessor ()
 
IMessageEnvelope IConnector. CreateEnvelope (IDictionary< string, object > metadata, IMessage message)
 
ObjectId CreateLargeObject (long objectLength)
 
void AssertNotDisposed ()
 
void AssertAuthenticated ()
 
IRef GetObjectRef (long objectId)
 
int AddResult (QueryResult result)
 
QueryResult GetResult (int resultId)
 
void ClearResults ()
 
IMessageProcessor IConnector. CreateProcessor ()
 
IMessageEnvelope IConnector. CreateEnvelope (IDictionary< string, object > metadata, IMessage message)
 
IStreamableObjectChannel IConnector. CreateObjectChannel (long objectId)
 
void DisposeChannel (long objId)
 
IRef CompleteStream (long objId)
 
ITriggerChannel IConnector. CreateTriggerChannel (string triggerName, string objectName, TriggerEventType eventType)
 
void DisposeTriggerChannel (long id)
 

Private Attributes

bool autoCommit
 
QueryParameterStyle parameterStyle
 
bool ignoreIdentifiersCase
 
Dictionary< int, QueryResultresultMap
 
int uniqueResultId
 
readonly Dictionary< long, IRef > blobIdMap
 
ParameterStyle parameterStyle
 
int triggerId
 
Dictionary< int, TriggerChanneltriggerChannels
 
readonly object triggerLock = new object()
 
readonly Dictionary< int, QueryResultresultMap
 

Detailed Description

Definition at line 31 of file ServerConnector.cs.

Constructor & Destructor Documentation

Deveel.Data.Protocol.ServerConnector.ServerConnector ( IDatabaseHandler  databaseHandler)
inlineprotected

Definition at line 39 of file ServerConnector.cs.

39  {
40  DatabaseHandler = databaseHandler;
41 
42  resultMap = new Dictionary<int, QueryResult>();
43  uniqueResultId = -1;
44  }
Dictionary< int, QueryResult > resultMap
Deveel.Data.Protocol.ServerConnector.~ServerConnector ( )
inlineprivate

Definition at line 46 of file ServerConnector.cs.

46  {
47  Dispose(false);
48  }
Deveel.Data.Protocol.ServerConnector.ServerConnector ( IDatabaseHandler  handler)
inlineprotected

Definition at line 41 of file ServerConnector.old.cs.

41  {
42  if (handler == null)
43  throw new ArgumentNullException("handler");
44 
45  DatabaseHandler = handler;
46  resultMap = new Dictionary<int, QueryResult>();
47  blobIdMap = new Dictionary<long, IRef>();
48  uniqueResultId = 1;
49  }
Dictionary< int, QueryResult > resultMap
readonly Dictionary< long, IRef > blobIdMap

Member Function Documentation

int Deveel.Data.Protocol.ServerConnector.AddResult ( QueryResult  result)
inlineprivate

Definition at line 367 of file ServerConnector.cs.

367  {
368  result.LockRoot();
369 
370  int resultId;
371 
372  lock (resultMap) {
373  resultId = ++uniqueResultId;
374  resultMap[resultId] = result;
375  }
376 
377  return resultId;
378  }
Dictionary< int, QueryResult > resultMap
int Deveel.Data.Protocol.ServerConnector.AddResult ( QueryResult  result)
inlineprivate

Definition at line 410 of file ServerConnector.old.cs.

410  {
411  // Lock the roots of the result set.
412  result.LockRoot(-1); // -1 because lock_key not implemented
413 
414  // Make a new result id
415  int resultId;
416  // This ensures this block can handle concurrent updates.
417  lock (resultMap) {
418  resultId = ++uniqueResultId;
419  // Add the result to the map.
420  resultMap[resultId] = result;
421  }
422 
423  return resultId;
424  }
Dictionary< int, QueryResult > resultMap
void Deveel.Data.Protocol.ServerConnector.AssertAuthenticated ( )
inlineprivate

Definition at line 77 of file ServerConnector.old.cs.

77  {
78  if (CurrentState != ConnectorState.Authenticated)
79  throw new InvalidOperationException("The connector is not authenticated.");
80  }
void Deveel.Data.Protocol.ServerConnector.AssertAuthenticated ( )
inlineprivate

Definition at line 85 of file ServerConnector.cs.

85  {
86  if (CurrentState != ConnectorState.Authenticated)
87  throw new InvalidOperationException("The connector is not authenticated.");
88 
89  if (User == null)
90  throw new InvalidOperationException("The connector is authenticated but no user is set.");
91  }
Provides the information for a user in a database system
Definition: User.cs:27
void Deveel.Data.Protocol.ServerConnector.AssertNotDisposed ( )
inlineprivate

Definition at line 72 of file ServerConnector.old.cs.

72  {
73  if (CurrentState == ConnectorState.Disposed)
74  throw new ObjectDisposedException(GetType().AssemblyQualifiedName);
75  }
void Deveel.Data.Protocol.ServerConnector.AssertNotDisposed ( )
inlineprivate

Definition at line 80 of file ServerConnector.cs.

80  {
81  if (CurrentState == ConnectorState.Disposed)
82  throw new ObjectDisposedException(GetType().AssemblyQualifiedName);
83  }
virtual bool Deveel.Data.Protocol.ServerConnector.Authenticate ( string  defaultSchema,
string  username,
string  password 
)
inlineprotectedvirtual

Definition at line 158 of file ServerConnector.cs.

158  {
159  if (CurrentState == ConnectorState.Authenticated)
160  throw new InvalidOperationException("Already authenticated.");
161 
162  // TODO: get the default schema from server configuration
163  if (String.IsNullOrEmpty(defaultSchema))
164  defaultSchema = "SA";
165 
166  // TODO: Log a debug information
167 
168  // TODO: Log an information about the logging user...
169 
170  try {
171  var user = Database.Authenticate(username, password);
172  if (user == null)
173  return false;
174 
175  if (!OnAuthenticated(user))
176  return false;
177 
178  User = user;
179 
180  // TODO: Accept more connection settings and store them here...
181  Metadata = new Dictionary<string, object> {
182  { "IgnoreIdentifiersCase", ignoreIdentifiersCase },
183  { "ParameterStyle", parameterStyle },
184  { "DefaultSchema", defaultSchema }
185  };
186 
187  ChangeState(ConnectorState.Authenticated);
188 
189  return true;
190  } catch (Exception) {
191  // TODO: throw server error
192  throw;
193  }
194  }
A long string in the system.
virtual bool OnAuthenticated(User user)
IDictionary< string, object > Metadata
void ChangeState(ConnectorState newState)
Provides the information for a user in a database system
Definition: User.cs:27
virtual bool Deveel.Data.Protocol.ServerConnector.Authenticate ( string  defaultSchema,
string  username,
string  password 
)
inlineprotectedvirtual

Definition at line 199 of file ServerConnector.old.cs.

199  {
200  if (CurrentState == ConnectorState.Authenticated &&
201  Session != null)
202  throw new InvalidOperationException("Already authenticated.");
203 
204  if (Logger.IsInterestedIn(LogLevel.Debug)) {
205  // Output the instruction to the _queries log.
206  Logger.DebugFormat(this, "[CLIENT] [{0}] - Log in", username);
207  }
208 
209  if (Logger.IsInterestedIn(LogLevel.Info)) {
210  Logger.InfoFormat(this, "Authenticate User: {0}", username);
211  }
212 
213  try {
214  Session = OnAuthenticate(defaultSchema, username, password);
215  if (Session == null)
216  return false;
217 
218  Session.Connection.AutoCommit = autoCommit;
219  Session.Connection.IsInCaseInsensitiveMode = ignoreIdentifiersCase;
220  Session.Connection.ParameterStyle = parameterStyle;
221 
222  ChangeState(ConnectorState.Authenticated);
223 
224  return true;
225  } catch (Exception e) {
226  // TODO: throw server error
227  throw;
228  }
229  }
LogLevel
The level listened by a diagnostic logger
Definition: LogLevel.cs:23
void ChangeState(ConnectorState newState)
virtual AuthenticatedSession OnAuthenticate(string defaultSchema, string username, string password)
int Deveel.Data.Protocol.ServerConnector.BeginTransaction ( )
inlineprotected

Definition at line 189 of file ServerConnector.old.cs.

189  {
191 
192  // TODO: In a future version, we will provide multiple transactions.
193  // for the moment we only set the current connection not to auto-commit
194  // that will require an explicit commit.
195  Session.Connection.AutoCommit = false;
196  return -1;
197  }
int Deveel.Data.Protocol.ServerConnector.BeginTransaction ( )
inlineprotected

Definition at line 380 of file ServerConnector.cs.

380  {
382 
383  var transaction = Database.CreateTransaction(IsolationLevel.Serializable);
384  if (transaction == null)
385  throw new InvalidOperationException();
386 
387  return transaction.CommitId;
388  }
void Deveel.Data.Protocol.ServerConnector.ChangeState ( ConnectorState  newState)
inlineprotected

Definition at line 82 of file ServerConnector.old.cs.

82  {
84  CurrentState = newState;
85  }
void Deveel.Data.Protocol.ServerConnector.ChangeState ( ConnectorState  newState)
inlineprotected

Definition at line 116 of file ServerConnector.cs.

116  {
118  CurrentState = newState;
119  }
void Deveel.Data.Protocol.ServerConnector.ClearResults ( )
inlineprivate

Definition at line 105 of file ServerConnector.cs.

105  {
106  lock (resultMap) {
107  foreach (var result in resultMap.Values) {
108  if (result != null)
109  result.Dispose();
110  }
111 
112  resultMap.Clear();
113  }
114  }
Dictionary< int, QueryResult > resultMap
void Deveel.Data.Protocol.ServerConnector.ClearResults ( )
inlineprivate

Definition at line 493 of file ServerConnector.old.cs.

493  {
494  List<int> keys;
495  lock (resultMap) {
496  keys = new List<int>(resultMap.Keys);
497  }
498 
499  foreach (int resultId in keys) {
500  DisposeResult(resultId);
501  }
502  }
Dictionary< int, QueryResult > resultMap
void Deveel.Data.Protocol.ServerConnector.CloseConnector ( )
inlineprotected

Definition at line 121 of file ServerConnector.old.cs.

121  {
122  try {
124  } catch (Exception ex) {
125  Logger.Error(this, "Error when closing the connector.");
126  Logger.Error(this, ex);
127  } finally {
128  ChangeState(ConnectorState.Closed);
129  }
130  }
void ChangeState(ConnectorState newState)
void Deveel.Data.Protocol.ServerConnector.CloseConnector ( )
inlineprotected

Definition at line 141 of file ServerConnector.cs.

141  {
142  try {
144  } catch (Exception) {
145  // TODO: log the exception
146  } finally {
147  ChangeState(ConnectorState.Closed);
148  }
149  }
void ChangeState(ConnectorState newState)
void Deveel.Data.Protocol.ServerConnector.CommitTransaction ( int  commitId)
inlineprotected

Definition at line 418 of file ServerConnector.cs.

418  {
420 
421  var transaction = Database.TransactionFactory.OpenTransactions.FindById(commitId);
422  if (transaction == null)
423  throw new InvalidOperationException();
424 
425  using (var session = new Session(transaction, User)) {
426  session.Commit();
427  }
428  }
ITransactionFactory TransactionFactory
Gets an object that is used to create new transactions to this database
Definition: IDatabase.cs:56
Provides the information for a user in a database system
Definition: User.cs:27
TransactionCollection OpenTransactions
Gets the collection of currently open transactions.
void Deveel.Data.Protocol.ServerConnector.CommitTransaction ( int  transactionId)
inlineprotected

Definition at line 504 of file ServerConnector.old.cs.

504  {
506 
507  try {
508  Session.Connection.Commit();
509  } finally {
510  Session.Connection.AutoCommit = autoCommit;
511  }
512  }
IRef Deveel.Data.Protocol.ServerConnector.CompleteStream ( long  objId)
inlineprivate

Definition at line 563 of file ServerConnector.old.cs.

563  {
564  lock (blobIdMap) {
565  var objRef = GetObjectRef(objId);
566  if (objRef == null)
567  throw new InvalidOperationException();
568 
569  blobIdMap.Remove(objId);
570  objRef.Complete();
571  return objRef;
572  }
573  }
readonly Dictionary< long, IRef > blobIdMap
IQueryResponse [] Deveel.Data.Protocol.ServerConnector.CoreExecuteQuery ( string  text,
IEnumerable< SqlQueryParameter >  parameters 
)
inlineprotected

Definition at line 257 of file ServerConnector.old.cs.

257  {
258  // Record the Query start time
259  DateTime startTime = DateTime.Now;
260 
261  // Where Query result eventually resides.
262  int resultId = -1;
263 
264  // For each StreamableObject in the query object, translate it to a
265  // IRef object that presumably has been pre-pushed onto the server from
266  // the client.
267 
268  // Evaluate the sql Query.
269  var query = new SqlQuery(text);
270  if (parameters != null) {
271  foreach (var parameter in parameters) {
272  var preparedParam = parameter.Value;
273  if (preparedParam is StreamableObject) {
274  var obj = (StreamableObject) preparedParam;
275  IRef objRef = CompleteStream(obj.Identifier);
276  preparedParam = objRef;
277  }
278  query.Parameters.Add(new SqlQueryParameter(parameter.Name, preparedParam));
279  }
280  }
281 
282  Table[] results = SqlQueryExecutor.Execute(Session.Connection, query);
283  var responses = new IQueryResponse[results.Length];
284  int j = 0;
285 
286  foreach (Table result in results) {
287  QueryResult queryResult;
288  try {
289  // Put the result in the result cache... This will Lock this object
290  // until it is removed from the result set cache. Returns an id that
291  // uniquely identifies this result set in future communication.
292  // NOTE: This locks the roots of the table so that its contents
293  // may not be altered.
294  queryResult = new QueryResult(query, result);
295  resultId = AddResult(queryResult);
296  } catch (Exception e) {
297  // If resultId set, then dispose the result set.
298  if (resultId != -1)
299  DisposeResult(resultId);
300 
301  throw;
302  }
303 
304  // The time it took the Query to execute.
305  TimeSpan taken = DateTime.Now - startTime;
306 
307  // Return the Query response
308  responses[j] = new QueryResponse(resultId, queryResult, (int) taken.TotalMilliseconds, "");
309  j++;
310  }
311 
312  return responses;
313  }
A TABLE object in a database.
IQueryResponse [] Deveel.Data.Protocol.ServerConnector.CoreExecuteQuery ( IQuery  context,
string  text,
IEnumerable< QueryParameter parameters 
)
inlineprotected

Definition at line 307 of file ServerConnector.cs.

307  {
308  // Where Query result eventually resides.
309  int resultId = -1;
310 
311  // For each StreamableObject in the query object, translate it to a
312  // IRef object that presumably has been pre-pushed onto the server from
313  // the client.
314 
315  // Evaluate the sql Query.
316  var query = new SqlQuery(text);
317  if (parameters != null) {
318  // TODO: Download the Large-Objects and replace with a reference
319  }
320 
321  var stopwatch = new Stopwatch();
322  stopwatch.Start();
323 
324  var results = context.ExecuteQuery(query);
325  var responses = new IQueryResponse[results.Length];
326  int j = 0;
327 
328  foreach (var result in results) {
329  QueryResult queryResult;
330  try {
331  queryResult = new QueryResult(query, result);
332  resultId = AddResult(queryResult);
333  } catch (Exception) {
334  if (resultId != -1)
335  DisposeResult(resultId);
336 
337  throw;
338  }
339 
340  var taken = stopwatch.ElapsedMilliseconds;
341 
342  // Return the Query response
343  responses[j] = new QueryResponse(resultId, queryResult, (int)taken, "");
344 
345  j++;
346  }
347 
348  stopwatch.Stop();
349  return responses;
350  }
abstract IServerMessageEnvelope Deveel.Data.Protocol.ServerConnector.CreateEnvelope ( IDictionary< string, object >  metadata,
IMessage  message 
)
protectedpure virtual
IMessageEnvelope IConnector. Deveel.Data.Protocol.ServerConnector.CreateEnvelope ( IDictionary< string, object >  metadata,
IMessage  message 
)
inlineprivate

Implements Deveel.Data.Protocol.IConnector.

Definition at line 396 of file ServerConnector.cs.

396  {
397  return CreateEnvelope(metadata, message);
398  }
abstract IServerMessageEnvelope CreateEnvelope(IDictionary< string, object > metadata, IMessage message)
abstract IServerMessageEnvelope Deveel.Data.Protocol.ServerConnector.CreateEnvelope ( IDictionary< string, object >  metadata,
IMessage  message 
)
protectedpure virtual
IMessageEnvelope IConnector. Deveel.Data.Protocol.ServerConnector.CreateEnvelope ( IDictionary< string, object >  metadata,
IMessage  message 
)
inlineprivate

Implements Deveel.Data.Protocol.IConnector.

Definition at line 532 of file ServerConnector.old.cs.

532  {
533  return CreateEnvelope(metadata, message);
534  }
abstract IServerMessageEnvelope CreateEnvelope(IDictionary< string, object > metadata, IMessage message)
ObjectId Deveel.Data.Protocol.ServerConnector.CreateLargeObject ( long  objectLength)
inlineprivate

Definition at line 496 of file ServerConnector.cs.

496  {
497  throw new NotImplementedException();
498  }
ILargeObjectChannel Deveel.Data.Protocol.ServerConnector.CreateObjectChannel ( long  objectId)
inline

Implements Deveel.Data.Protocol.IConnector.

Definition at line 401 of file ServerConnector.cs.

401  {
402  throw new NotImplementedException();
403  }
IStreamableObjectChannel IConnector. Deveel.Data.Protocol.ServerConnector.CreateObjectChannel ( long  objectId)
inlineprivate

Implements Deveel.Data.Protocol.IConnector.

Definition at line 545 of file ServerConnector.old.cs.

545  {
546  return CreateObjectChannel(objectId);
547  }
ILargeObjectChannel CreateObjectChannel(long objectId)
virtual IStreamableObjectChannel Deveel.Data.Protocol.ServerConnector.CreateObjectChannel ( long  objectId)
inlineprotectedvirtual

Implements Deveel.Data.Protocol.IConnector.

Definition at line 549 of file ServerConnector.old.cs.

549  {
550  var obj = GetObjectRef(objectId);
551  if (obj == null)
552  throw new InvalidOperationException("The object was not created or was not found.");
553 
554  return new DirectStreamableObjectChannel(this, obj);
555  }
IMessageProcessor IConnector. Deveel.Data.Protocol.ServerConnector.CreateProcessor ( )
inlineprivate

Implements Deveel.Data.Protocol.IConnector.

Definition at line 390 of file ServerConnector.cs.

390  {
391  return new ServerMessageProcessor(this);
392  }
IMessageProcessor IConnector. Deveel.Data.Protocol.ServerConnector.CreateProcessor ( )
inlineprivate

Implements Deveel.Data.Protocol.IConnector.

Definition at line 526 of file ServerConnector.old.cs.

526  {
527  return new ServerMessageProcessor(this);
528  }
IQuery Deveel.Data.Protocol.ServerConnector.CreateQueryContext ( )
inlineprivate

Definition at line 246 of file ServerConnector.cs.

246  {
247  // TODO: make the isolation level configurable...
248  var transaction = Database.CreateTransaction(IsolationLevel.Serializable);
249  var session = new Session(transaction, User);
250  session.AutoCommit(true);
251  return session.CreateQuery();
252  }
Provides the information for a user in a database system
Definition: User.cs:27
long Deveel.Data.Protocol.ServerConnector.CreateStreamableObject ( ReferenceType  referenceType,
long  length 
)
inlineprotected

Definition at line 231 of file ServerConnector.old.cs.

231  {
232  lock (blobIdMap) {
233  try {
234  var obj = Session.Connection.CreateLargeObject(referenceType, length);
235  blobIdMap[obj.Id] = obj;
236  return obj.Id;
237  } catch (Exception ex) {
238  Logger.ErrorFormat(this, "A request to create an object of type {0} with length {1} caused and error.", referenceType, length);
239  Logger.Error(this, ex);
240  throw;
241  }
242  }
243  }
readonly Dictionary< long, IRef > blobIdMap
ITriggerChannel Deveel.Data.Protocol.ServerConnector.CreateTriggerChannel ( string  triggerName,
string  objectName,
TriggerEventType  eventType 
)
inline

Implements Deveel.Data.Protocol.IConnector.

Definition at line 405 of file ServerConnector.cs.

405  {
406  throw new NotImplementedException();
407  }
ITriggerChannel IConnector. Deveel.Data.Protocol.ServerConnector.CreateTriggerChannel ( string  triggerName,
string  objectName,
TriggerEventType  eventType 
)
inlineprivate

Definition at line 575 of file ServerConnector.old.cs.

575  {
576  return CreateTriggerChannel(triggerName, objectName, eventType);
577  }
ITriggerChannel CreateTriggerChannel(string triggerName, string objectName, TriggerEventType eventType)
virtual ITriggerChannel Deveel.Data.Protocol.ServerConnector.CreateTriggerChannel ( string  triggerName,
string  objectName,
TriggerEventType  eventType 
)
inlineprotectedvirtual

Definition at line 579 of file ServerConnector.old.cs.

579  {
581 
582  lock (triggerLock) {
583  if (triggerChannels == null)
584  triggerChannels = new Dictionary<int, TriggerChannel>();
585 
586  foreach (TriggerChannel channel in triggerChannels.Values) {
587  // If there's an open channel for the trigger return it
588  if (channel.ShouldNotify(triggerName, objectName, eventType))
589  return channel;
590  }
591 
592  int id = ++triggerId;
593  var newChannel = new TriggerChannel(this, id, triggerName, objectName, eventType);
594  triggerChannels[id] = newChannel;
595  return newChannel;
596  }
597  }
Dictionary< int, TriggerChannel > triggerChannels
void Deveel.Data.Protocol.ServerConnector.Dispose ( )
inline

Definition at line 54 of file ServerConnector.cs.

54  {
55  GC.SuppressFinalize(this);
56  Dispose(true);
57  }
virtual void Deveel.Data.Protocol.ServerConnector.Dispose ( bool  disposing)
inlineprotectedvirtual

Reimplemented in Deveel.Data.Protocol.LocalDatabaseClient.ServerConnector.

Definition at line 59 of file ServerConnector.cs.

59  {
60  if (disposing) {
61  ClearResults();
62  }
63 
64  Database = null;
65  DatabaseHandler = null;
66 
67  ChangeState(ConnectorState.Disposed);
68  }
void ChangeState(ConnectorState newState)
void Deveel.Data.Protocol.ServerConnector.Dispose ( )
inline

Definition at line 599 of file ServerConnector.old.cs.

599  {
600  Dispose(true);
601  GC.SuppressFinalize(this);
602  }
virtual void Deveel.Data.Protocol.ServerConnector.Dispose ( bool  disposing)
inlineprotectedvirtual

Reimplemented in Deveel.Data.Protocol.LocalDatabaseClient.ServerConnector.

Definition at line 604 of file ServerConnector.old.cs.

604  {
605  if (disposing) {
606  // Clear the result set mapping
607  ClearResults();
608 
609  if (Session != null)
610  Session.Dispose();
611  }
612 
613  ChangeState(ConnectorState.Disposed);
614  }
void ChangeState(ConnectorState newState)
void Deveel.Data.Protocol.ServerConnector.DisposeChannel ( long  objId)
inlineprivate

Definition at line 557 of file ServerConnector.old.cs.

557  {
558  lock (blobIdMap) {
559  blobIdMap.Remove(objId);
560  }
561  }
readonly Dictionary< long, IRef > blobIdMap
void Deveel.Data.Protocol.ServerConnector.DisposeResult ( int  resultId)
inlineprivate

Definition at line 352 of file ServerConnector.cs.

352  {
353  // Remove this entry.
354  QueryResult result;
355  lock (resultMap) {
356  if (resultMap.TryGetValue(resultId, out result))
357  resultMap.Remove(resultId);
358  }
359 
360  if (result != null) {
361  result.Dispose();
362  } else {
363  // TODO: Log an error ...
364  }
365  }
Dictionary< int, QueryResult > resultMap
void Deveel.Data.Protocol.ServerConnector.DisposeResult ( int  resultId)
inlineprotected

Definition at line 479 of file ServerConnector.old.cs.

479  {
480  // Remove this entry.
481  QueryResult result;
482  lock (resultMap) {
483  if (resultMap.TryGetValue(resultId, out result))
484  resultMap.Remove(resultId);
485  }
486  if (result != null) {
487  result.Dispose();
488  } else {
489  Logger.Error(this, "Attempt to dispose invalid 'resultId'.");
490  }
491  }
Dictionary< int, QueryResult > resultMap
void Deveel.Data.Protocol.ServerConnector.DisposeTriggerChannel ( long  id)
inlineprivate

Definition at line 966 of file ServerConnector.old.cs.

966  {
967  throw new NotImplementedException();
968  }
IQueryResponse [] Deveel.Data.Protocol.ServerConnector.ExecuteQuery ( long  commitId,
string  text,
IEnumerable< QueryParameter parameters 
)
inlineprotected

Definition at line 254 of file ServerConnector.cs.

254  {
256 
257  IQuery queryContext;
258  if (commitId > 0) {
259  queryContext = OpenQueryContext(commitId);
260  } else {
261  queryContext = CreateQueryContext();
262  }
263 
264  return ExecuteQuery(queryContext, text, parameters);
265  }
IQueryResponse[] ExecuteQuery(long commitId, string text, IEnumerable< QueryParameter > parameters)
IQuery OpenQueryContext(long commitId)
virtual IQueryResponse [] Deveel.Data.Protocol.ServerConnector.ExecuteQuery ( IQuery  context,
string  text,
IEnumerable< QueryParameter parameters 
)
inlineprotectedvirtual

Definition at line 267 of file ServerConnector.cs.

267  {
268  // TODO: Log a debug message..
269 
270  IQueryResponse[] response = null;
271 
272  try {
273  // Execute the Query (behaviour for this comes from super).
274  response = CoreExecuteQuery(context, text, parameters);
275 
276  // Return the result.
277  return response;
278  } finally {
279  // This always happens after tables are unlocked.
280  // Also guarenteed to happen even if something fails.
281 
282  // If we are in auto-commit mode then commit the Query here.
283  // Do we auto-commit?
284  if (context.AutoCommit()) {
285  // If an error occured then roll-back
286  if (response == null) {
287  // Rollback.
288  context.Rollback();
289  } else {
290  try {
291  // Otherwise commit.
292  context.Commit();
293  } catch (Exception) {
294  foreach (IQueryResponse queryResponse in response) {
295  // Dispose this response if the commit failed.
296  DisposeResult(queryResponse.ResultId);
297  }
298 
299  // And throw the SQL Exception
300  throw;
301  }
302  }
303  }
304  }
305  }
IQueryResponse[] CoreExecuteQuery(IQuery context, string text, IEnumerable< QueryParameter > parameters)
virtual IQueryResponse [] Deveel.Data.Protocol.ServerConnector.ExecuteQuery ( string  text,
IEnumerable< SqlQueryParameter >  parameters 
)
inlineprotectedvirtual

Definition at line 315 of file ServerConnector.old.cs.

315  {
316  // Log this Query if Query logging is enabled
317  if (Logger.IsInterestedIn(LogLevel.Debug)) {
318  // Output the instruction to the _queries log.
319  Logger.DebugFormat(this, "[CLIENT] [{0}] - Query: {1}", Session.User.UserName, text);
320  }
321 
322  // Write debug message (Info level)
323  if (Logger.IsInterestedIn(LogLevel.Debug)) {
324  Logger.DebugFormat(this, "Query From User: {0}", Session.User.UserName);
325  Logger.DebugFormat(this, "Query: {0}", text.Trim());
326  }
327 
328  // Get the locking mechanism.
329  LockingMechanism locker = Session.Connection.LockingMechanism;
330  LockingMode lockMode = LockingMode.None;
331  IQueryResponse[] response = null;
332 
333  try {
334  try {
335  // For simplicity - all database locking is now exclusive inside
336  // a transaction. This means it is not possible to execute
337  // queries concurrently inside a transaction. However, we are
338  // still able to execute queries concurrently from different
339  // connections.
340  //
341  // It's debatable whether we even need to perform this Lock anymore
342  // because we could change the contract of this method so that
343  // it is not thread safe. This would require that the callee ensures
344  // more than one thread can not execute queries on the connection.
345  lockMode = LockingMode.Exclusive;
346  locker.SetMode(lockMode);
347 
348  // Execute the Query (behaviour for this comes from super).
349  response = CoreExecuteQuery(text, parameters);
350 
351  // Return the result.
352  return response;
353 
354  } finally {
355  try {
356  // This is executed no matter what happens. Very important we
357  // unlock the tables.
358  if (lockMode != LockingMode.None) {
359  locker.FinishMode(lockMode);
360  }
361  } catch (Exception e) {
362  // If this throws an exception, we should output it to the debug
363  // log and screen.
364  Logger.Error(this, "Exception finishing locks");
365  Logger.Error(this, e);
366  // Note, we can't throw an error here because we may already be in
367  // an exception that happened in the above 'try' block.
368  }
369  }
370  } finally {
371  // This always happens after tables are unlocked.
372  // Also guarenteed to happen even if something fails.
373 
374  // If we are in auto-commit mode then commit the Query here.
375  // Do we auto-commit?
376  if (Session.Connection.AutoCommit) {
377  // Yes, so grab an exclusive Lock and auto-commit.
378  try {
379  // Lock into exclusive mode.
380  locker.SetMode(LockingMode.Exclusive);
381  // If an error occured then roll-back
382  if (response == null) {
383  // Rollback.
384  Session.Connection.Rollback();
385  } else {
386  try {
387  // Otherwise commit.
388  Session.Connection.Commit();
389  } catch (Exception e) {
390  foreach (IQueryResponse queryResponse in response) {
391  // Dispose this response if the commit failed.
392  DisposeResult(queryResponse.ResultId);
393  }
394 
395  // And throw the SQL Exception
396  throw;
397  }
398  }
399  } finally {
400  locker.FinishMode(LockingMode.Exclusive);
401  }
402  }
403  }
404  }
LockingMode
The mode applied to a lock over a resource during a transaction.
Definition: LockingMode.cs:24
LogLevel
The level listened by a diagnostic logger
Definition: LogLevel.cs:23
IQueryResponse[] CoreExecuteQuery(IQuery context, string text, IEnumerable< QueryParameter > parameters)
virtual EncryptionData Deveel.Data.Protocol.ServerConnector.GetEncryptionData ( )
inlineprotectedvirtual

Definition at line 136 of file ServerConnector.old.cs.

136  {
137  return null;
138  }
virtual EncryptionData Deveel.Data.Protocol.ServerConnector.GetEncryptionData ( )
inlineprotectedvirtual

Definition at line 154 of file ServerConnector.cs.

154  {
155  return null;
156  }
virtual IMessage Deveel.Data.Protocol.ServerConnector.GetMessage ( IMessageEnvelope  envelope)
inlineprotectedvirtual

Definition at line 409 of file ServerConnector.cs.

409  {
410  if (envelope == null)
411  return null;
412 
413  // TODO: handle errors? it's not supposed the client to send errors to the server ...
414 
415  return envelope.Message;
416  }
virtual IMessage Deveel.Data.Protocol.ServerConnector.GetMessage ( IMessageEnvelope  envelope)
inlineprotectedvirtual

Definition at line 536 of file ServerConnector.old.cs.

536  {
537  if (envelope == null)
538  return null;
539 
540  // TODO: handle errors? it's not supposed the client to send errors to the server ...
541 
542  return envelope.Message;
543  }
IRef Deveel.Data.Protocol.ServerConnector.GetObjectRef ( long  objectId)
inlineprivate

Definition at line 245 of file ServerConnector.old.cs.

245  {
246  lock (blobIdMap) {
247  IRef obj;
248  if (!blobIdMap.TryGetValue(objectId, out obj)) {
249  obj = Session.Connection.GetLargeObject(objectId);
250  blobIdMap[objectId] = obj;
251  }
252 
253  return obj;
254  }
255  }
readonly Dictionary< long, IRef > blobIdMap
QueryResult Deveel.Data.Protocol.ServerConnector.GetResult ( int  resultId)
inlineprivate

Definition at line 426 of file ServerConnector.old.cs.

426  {
427  lock (resultMap) {
428  QueryResult result;
429  return resultMap.TryGetValue(resultId, out result) ? result : null;
430  }
431  }
Dictionary< int, QueryResult > resultMap
QueryResult Deveel.Data.Protocol.ServerConnector.GetResult ( int  resultId)
inlineprotected

Definition at line 486 of file ServerConnector.cs.

486  {
487  lock (resultMap) {
488  QueryResult result;
489  if (!resultMap.TryGetValue(resultId, out result))
490  return null;
491 
492  return result;
493  }
494  }
Dictionary< int, QueryResult > resultMap
QueryResultPart Deveel.Data.Protocol.ServerConnector.GetResultPart ( int  resultId,
int  startRow,
int  countRows 
)
inlineprotected

Definition at line 433 of file ServerConnector.old.cs.

433  {
435 
436  QueryResult table = GetResult(resultId);
437  if (table == null)
438  throw new DatabaseException("'resultId' invalid.");
439 
440  int rowEnd = startRow + countRows;
441 
442  if (startRow < 0 || startRow >= table.RowCount ||
443  rowEnd > table.RowCount) {
444  throw new DatabaseException("Result part out of range.");
445  }
446 
447  try {
448  int colCount = table.ColumnCount;
449  var block = new QueryResultPart(colCount);
450  for (int r = startRow; r < rowEnd; ++r) {
451  var row = new object[colCount];
452  for (int c = 0; c < colCount; ++c) {
453  TObject value = table.GetCellContents(c, r);
454 
455  // If this is a IRef, we must assign it a streamable object
456  // id that the client can use to access the large object.
457  object clientOb;
458  if (value.Object is IRef) {
459  var reference = (IRef) value.Object;
460  clientOb = new StreamableObject(reference.Type, reference.RawSize, reference.Id);
461  } else {
462  clientOb = value.Object;
463  }
464 
465  row[c] = clientOb;
466  }
467 
468  block.AddRow(row);
469  }
470  return block;
471  } catch (Exception e) {
472  Logger.Warning(this, e);
473  // If an exception was generated while getting the cell contents, then
474  // throw an DataException.
475  throw new DatabaseException("Exception while reading results: " + e.Message, e);
476  }
477  }
QueryResult GetResult(int resultId)
QueryResultPart Deveel.Data.Protocol.ServerConnector.GetResultPart ( int  resultId,
int  startRow,
int  countRows 
)
inlineprotected

Definition at line 442 of file ServerConnector.cs.

442  {
444 
445  var table = GetResult(resultId);
446  if (table == null)
447  throw new InvalidOperationException();
448 
449  int rowEnd = startRow + countRows;
450 
451  if (startRow < 0 || startRow >= table.RowCount || rowEnd > table.RowCount) {
452  throw new InvalidOperationException("Result part out of range.");
453  }
454 
455  try {
456  int colCount = table.ColumnCount;
457  var block = new QueryResultPart(colCount);
458  for (int r = startRow; r < rowEnd; ++r) {
459  var row = new ISqlObject[colCount];
460  var sizes = new int[colCount];
461 
462  for (int c = 0; c < colCount; ++c) {
463  var value = table.GetValue(r, c);
464 
465  ISqlObject clientOb = null;
466  if (value.Value is IObjectRef) {
467  var reference = (IObjectRef)value.Value;
468  // TODO: Make a protocol placeholder for the large object ref
469  } else {
470  clientOb = value.Value;
471  }
472 
473  row[c] = clientOb;
474  sizes[c] = value.Size;
475  }
476 
477  block.AddRow(new QueryResultRow(row, sizes));
478  }
479  return block;
480  } catch (Exception) {
481  // TODO: Log a warning ...
482  throw;
483  }
484  }
Defines the contract for a valid SQL Object
Definition: ISqlObject.cs:23
QueryResult GetResult(int resultId)
abstract ConnectionEndPoint Deveel.Data.Protocol.ServerConnector.MakeEndPoint ( IDictionary< string, object >  properties)
pure virtual
abstract ConnectionEndPoint Deveel.Data.Protocol.ServerConnector.MakeEndPoint ( IDictionary< string, object >  properties)
pure virtual
virtual AuthenticatedSession Deveel.Data.Protocol.ServerConnector.OnAuthenticate ( string  defaultSchema,
string  username,
string  password 
)
inlineprotectedvirtual

Definition at line 140 of file ServerConnector.old.cs.

140  {
141  var user = Database.AuthenticateUser(username, password, RemoteEndPoint);
142 
143  if (user == null)
144  return null;
145 
146  IDatabaseConnection connection = Database.CreateNewConnection(user, OnTriggerFired);
147 
148  // Put the connection in exclusive mode
149  LockingMechanism locker = connection.LockingMechanism;
150  locker.SetMode(LockingMode.Exclusive);
151 
152  try {
153  // By default, connections are auto-commit
154  connection.AutoCommit = true;
155 
156  // Set the default schema for this connection if it exists
157  if (connection.SchemaExists(defaultSchema)) {
158  connection.SetDefaultSchema(defaultSchema);
159  } else {
160  Logger.WarningFormat(this, "Couldn't change to '{0}' schema.", defaultSchema);
161 
162  // If we can't change to the schema then change to the APP schema
163  connection.SetDefaultSchema(ConfigDefaultValues.DefaultSchema);
164  }
165  } finally {
166  try {
167  connection.Commit();
168  } catch (TransactionException e) {
169  // Just issue a warning...
170  Logger.Warning(this, e);
171  } finally {
172  // Guarentee that we unluck from EXCLUSIVE
173  locker.FinishMode(LockingMode.Exclusive);
174  }
175  }
176 
177  return new AuthenticatedSession(user, connection);
178  }
LockingMode
The mode applied to a lock over a resource during a transaction.
Definition: LockingMode.cs:24
virtual void OnTriggerFired(string triggerName, string triggerSource, TriggerEventType eventType, int count)
virtual bool Deveel.Data.Protocol.ServerConnector.OnAuthenticated ( User  user)
inlineprotectedvirtual

Definition at line 196 of file ServerConnector.cs.

196  {
197  return true;
198  }
virtual void Deveel.Data.Protocol.ServerConnector.OnCloseConnector ( )
inlineprotectedvirtual

Definition at line 132 of file ServerConnector.old.cs.

132  {
133 
134  }
virtual void Deveel.Data.Protocol.ServerConnector.OnCloseConnector ( )
inlineprotectedvirtual

Definition at line 151 of file ServerConnector.cs.

151  {
152  }
virtual void Deveel.Data.Protocol.ServerConnector.OnConnectorOpen ( )
inlineprotectedvirtual

Definition at line 103 of file ServerConnector.old.cs.

103  {
104  }
virtual void Deveel.Data.Protocol.ServerConnector.OnConnectorOpen ( )
inlineprotectedvirtual

Definition at line 136 of file ServerConnector.cs.

136  {
137  }
virtual void Deveel.Data.Protocol.ServerConnector.OnTriggerFired ( string  triggerName,
string  triggerSource,
TriggerEventType  eventType,
int  count 
)
inlineprotectedvirtual

Definition at line 180 of file ServerConnector.old.cs.

180  {
181  lock (triggerChannels) {
182  foreach (var channel in triggerChannels.Values) {
183  if (channel.ShouldNotify(triggerName, triggerSource, eventType))
184  channel.Notify(triggerName, triggerSource, eventType, count);
185  }
186  }
187  }
Dictionary< int, TriggerChannel > triggerChannels
void Deveel.Data.Protocol.ServerConnector.OpenConnector ( ConnectionEndPoint  remoteEndPoint,
string  databaseName 
)
inlineprotected

Definition at line 87 of file ServerConnector.old.cs.

87  {
88  try {
89  RemoteEndPoint = remoteEndPoint;
90  Database = DatabaseHandler.GetDatabase(databaseName);
91  if (Database == null)
92  throw new DatabaseException();
93 
96  } catch (Exception ex) {
97  Logger.Error(this, "Error when opening the connector.");
98  Logger.Error(this, ex);
99  throw;
100  }
101  }
IDatabase GetDatabase(string databaseName)
void ChangeState(ConnectorState newState)
void Deveel.Data.Protocol.ServerConnector.OpenConnector ( ConnectionEndPoint  remoteEndPoint,
string  databaseName 
)
inlineprotected

Definition at line 121 of file ServerConnector.cs.

121  {
122  try {
123  RemoteEndPoint = remoteEndPoint;
124  Database = DatabaseHandler.GetDatabase(databaseName);
125  if (Database == null)
126  throw new InvalidOperationException();
127 
128  OnConnectorOpen();
130  } catch (Exception) {
131  // TODO: Log the error...
132  throw;
133  }
134  }
IDatabase GetDatabase(string databaseName)
void ChangeState(ConnectorState newState)
IQuery Deveel.Data.Protocol.ServerConnector.OpenQueryContext ( long  commitId)
inlineprivate

Definition at line 237 of file ServerConnector.cs.

237  {
238  var transaction = Database.TransactionFactory.OpenTransactions.FindById((int)commitId);
239  if (transaction == null)
240  throw new InvalidOperationException();
241 
242  var session = new Session(transaction, User);
243  return session.CreateQuery();
244  }
ITransactionFactory TransactionFactory
Gets an object that is used to create new transactions to this database
Definition: IDatabase.cs:56
Provides the information for a user in a database system
Definition: User.cs:27
TransactionCollection OpenTransactions
Gets the collection of currently open transactions.
void Deveel.Data.Protocol.ServerConnector.RollbackTransaction ( int  commitId)
inlineprotected

Definition at line 430 of file ServerConnector.cs.

430  {
432 
433  var transaction = Database.TransactionFactory.OpenTransactions.FindById(commitId);
434  if (transaction == null)
435  throw new InvalidOperationException();
436 
437  using (var session = new Session(transaction, User)) {
438  session.Rollback();
439  }
440  }
ITransactionFactory TransactionFactory
Gets an object that is used to create new transactions to this database
Definition: IDatabase.cs:56
Provides the information for a user in a database system
Definition: User.cs:27
TransactionCollection OpenTransactions
Gets the collection of currently open transactions.
void Deveel.Data.Protocol.ServerConnector.RollbackTransaction ( int  transactionId)
inlineprotected

Definition at line 514 of file ServerConnector.old.cs.

514  {
516 
517  try {
518  Session.Connection.Rollback();
519  } finally {
520  Session.Connection.AutoCommit = autoCommit;
521  }
522  }
void Deveel.Data.Protocol.ServerConnector.SetAutoCommit ( bool  value)
inlineprotected

Definition at line 93 of file ServerConnector.cs.

93  {
94  autoCommit = value;
95  }
void Deveel.Data.Protocol.ServerConnector.SetAutoCommit ( bool  state)
inlineprotected

Definition at line 106 of file ServerConnector.old.cs.

void Deveel.Data.Protocol.ServerConnector.SetIgnoreIdentifiersCase ( bool  value)
inlineprotected

Definition at line 101 of file ServerConnector.cs.

101  {
102  ignoreIdentifiersCase = value;
103  }
void Deveel.Data.Protocol.ServerConnector.SetIgnoreIdentifiersCase ( bool  state)
inlineprotected

Definition at line 111 of file ServerConnector.old.cs.

void Deveel.Data.Protocol.ServerConnector.SetParameterStyle ( QueryParameterStyle  parameterStyle)
inlineprotected

Definition at line 97 of file ServerConnector.cs.

97  {
99  }
void Deveel.Data.Protocol.ServerConnector.SetParameterStyle ( ParameterStyle  style)
inlineprotected

Definition at line 116 of file ServerConnector.old.cs.

116  {
118  parameterStyle = style;
119  }

Member Data Documentation

bool Deveel.Data.Protocol.ServerConnector.autoCommit
private

Definition at line 32 of file ServerConnector.cs.

readonly Dictionary<long, IRef> Deveel.Data.Protocol.ServerConnector.blobIdMap
private

Definition at line 31 of file ServerConnector.old.cs.

bool Deveel.Data.Protocol.ServerConnector.ignoreIdentifiersCase
private

Definition at line 34 of file ServerConnector.cs.

QueryParameterStyle Deveel.Data.Protocol.ServerConnector.parameterStyle
private

Definition at line 33 of file ServerConnector.cs.

ParameterStyle Deveel.Data.Protocol.ServerConnector.parameterStyle
private

Definition at line 35 of file ServerConnector.old.cs.

Dictionary<int, QueryResult> Deveel.Data.Protocol.ServerConnector.resultMap
private

Definition at line 36 of file ServerConnector.cs.

readonly Dictionary<int, QueryResult> Deveel.Data.Protocol.ServerConnector.resultMap
private

Definition at line 406 of file ServerConnector.old.cs.

Dictionary<int, TriggerChannel> Deveel.Data.Protocol.ServerConnector.triggerChannels
private

Definition at line 38 of file ServerConnector.old.cs.

int Deveel.Data.Protocol.ServerConnector.triggerId
private

Definition at line 37 of file ServerConnector.old.cs.

readonly object Deveel.Data.Protocol.ServerConnector.triggerLock = new object()
private

Definition at line 39 of file ServerConnector.old.cs.

int Deveel.Data.Protocol.ServerConnector.uniqueResultId
private

Definition at line 37 of file ServerConnector.cs.

Property Documentation

ConnectorState Deveel.Data.Protocol.ServerConnector.CurrentState
getprivate set

Definition at line 78 of file ServerConnector.cs.

IDatabase Deveel.Data.Protocol.ServerConnector.Database
getprivate setprotected

Definition at line 52 of file ServerConnector.cs.

IDatabaseHandler Deveel.Data.Protocol.ServerConnector.DatabaseHandler
getprivate setprotected

Definition at line 50 of file ServerConnector.cs.

abstract ConnectionEndPoint Deveel.Data.Protocol.ServerConnector.LocalEndPoint
get

Definition at line 70 of file ServerConnector.cs.

ILogger Deveel.Data.Protocol.ServerConnector.Logger
getprotected

Definition at line 61 of file ServerConnector.old.cs.

IDictionary<string, object> Deveel.Data.Protocol.ServerConnector.Metadata
getprivate setprotected

Definition at line 76 of file ServerConnector.cs.

ConnectionEndPoint Deveel.Data.Protocol.ServerConnector.RemoteEndPoint
getprivate set

Definition at line 72 of file ServerConnector.cs.

AuthenticatedSession Deveel.Data.Protocol.ServerConnector.Session
getprotected set

Definition at line 51 of file ServerConnector.old.cs.

User Deveel.Data.Protocol.ServerConnector.User
getprivate setprotected

Definition at line 74 of file ServerConnector.cs.


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