Deveel.Data.SystemSession.CreateQuery C# (CSharp) Method

CreateQuery() public method

public CreateQuery ( ) : IQuery
return IQuery
        public IQuery CreateQuery()
        {
            return new Query(this);
        }

Usage Example

        private void SetupSystem()
        {
            using (var transaction = Database.CreateSafeTransaction(IsolationLevel.Serializable)) {
                try {
                    using (var session = new SystemSession(transaction, SystemSchema.Name)) {
                        using (var query = session.CreateQuery()) {
                            foreach (var feature in Database.System.Features)
                            {
                                try {
                                    feature.OnSystemEvent(SystemEventType.TableCompositeSetup, query);
                                } catch (Exception ex) {
                                    query.Context.OnError(
                                        new Exception(
                                            String.Format("The feature {0} (v{1}) caused an error on Composite-Setup event.", feature.FeatureName,
                                                          feature.Version), ex));
                                    throw;
                                }
                            }
                        }
                    }

                    // Commit and close the transaction.
                    transaction.Commit();
                } catch (TransactionException e) {
                    throw new InvalidOperationException("Transaction Exception initializing the system.", e);
                }
            }
        }
All Usage Examples Of Deveel.Data.SystemSession::CreateQuery