public DelimitedDbStatement(
     IContribSqlDialect dialect,
     TransactionScope scope,
     IDbConnection connection,
     IDbTransaction transaction)
     : base(dialect, scope, connection, transaction)
 {}
 public DelimitedDbStatement(
     IContribSqlDialect dialect,
     TransactionScope scope,
     IDbConnection connection,
     IDbTransaction transaction)
     : base(dialect, scope, connection, transaction)
 {
 }
Exemple #3
0
 public FirebirdSqlPersistenceFactory(IConnectionFactory factory, ISerialize serializer, IContribSqlDialect dialect, IContribStreamIdHasher streamIdHasher = null, TransactionScopeOption scopeOption = TransactionScopeOption.Suppress, int pageSize = DefaultPageSize)
 {
     this._connectionFactory      = factory;
     this._dialect                = dialect;
     this._transactionScopeOption = scopeOption;
     this._serializer             = serializer;
     this._scopeOption            = scopeOption;
     this._streamIdHasher         = streamIdHasher ?? new StreamIdHasher <SHA1>();
     this._pagesize               = pageSize;
 }
		public FirebirdSqlPersistenceFactory(IConnectionFactory factory, ISerialize serializer, IContribSqlDialect dialect, IContribStreamIdHasher streamIdHasher = null, TransactionScopeOption scopeOption = TransactionScopeOption.Suppress, int pageSize = DefaultPageSize)
		{
			this._connectionFactory = factory;
			this._dialect = dialect;
			this._transactionScopeOption = scopeOption;
			this._serializer = serializer;
			this._scopeOption = scopeOption;
			this._streamIdHasher = streamIdHasher ?? new StreamIdHasher<SHA1>();
			this._pagesize = pageSize;
		}
        public CommonDbStatement(
            IContribSqlDialect dialect,
            TransactionScope scope,
            IDbConnection connection,
            IDbTransaction transaction)
        {
            this.Parameters = new Dictionary<string, Tuple<object, DbType?>>();

            this._dialect = dialect;
            this._scope = scope;
            this._connection = connection;
            this._transaction = transaction;
        }
Exemple #6
0
        public CommonDbStatement(
            IContribSqlDialect dialect,
            TransactionScope scope,
            IDbConnection connection,
            IDbTransaction transaction)
        {
            this.Parameters = new Dictionary <string, Tuple <object, DbType?> >();

            this._dialect     = dialect;
            this._scope       = scope;
            this._connection  = connection;
            this._transaction = transaction;
        }
 public PagedEnumerationCollection(
     TransactionScope scope,
     IContribSqlDialect dialect,
     IDbCommand command,
     NextPageDelegate nextpage,
     int pageSize,
     params IDisposable[] disposable)
 {
     this._scope      = scope;
     this._dialect    = dialect;
     this._command    = command;
     this._nextpage   = nextpage;
     this._pageSize   = pageSize;
     this._disposable = disposable ?? this._disposable;
 }
Exemple #8
0
        public FirebirdSqlPersistenceEngine(
            IConnectionFactory connectionFactory,
            IContribSqlDialect dialect,
            ISerialize serializer,
            TransactionScopeOption scopeOption,
            int pageSize,
            IContribStreamIdHasher streamIdHasher)
        {
            if (connectionFactory == null)
            {
                throw new ArgumentNullException("connectionFactory");
            }

            if (dialect == null)
            {
                throw new ArgumentNullException("dialect");
            }

            if (serializer == null)
            {
                throw new ArgumentNullException("serializer");
            }

            if (pageSize < 0)
            {
                throw new ArgumentException("pageSize");
            }

            if (streamIdHasher == null)
            {
                throw new ArgumentNullException("streamIdHasher");
            }

            this._connectionFactory = connectionFactory;
            this._dialect           = dialect;
            this._serializer        = serializer;
            this._scopeOption       = scopeOption;
            this._pageSize          = pageSize;
            this._streamIdHasher    = new StreamIdHasherValidator(streamIdHasher);

            Logger.Debug(Messages.UsingScope, this._scopeOption.ToString());
        }
Exemple #9
0
        public static ICommit GetCommit(this IDataRecord record, ISerialize serializer, IContribSqlDialect sqlDialect)
        {
            Logger.Verbose(Messages.DeserializingCommit, serializer.GetType());
            var headers = serializer.Deserialize <Dictionary <string, object> >(record, HeadersIndex);
            var events  = serializer.Deserialize <List <EventMessage> >(record, PayloadIndex);

            return(new Commit(record[BucketIdIndex].ToString(),
                              record[StreamIdOriginalIndex].ToString(),
                              record[StreamRevisionIndex].ToInt(),
                              record[CommitIdIndex].ToGuid(),
                              record[CommitSequenceIndex].ToInt(),
                              sqlDialect.ToDateTime(record[CommitStampIndex]),
                              new LongCheckpoint(record[CheckpointIndex].ToLong()).Value,
                              headers,
                              events));
        }
 /// <summary>
 /// Withes the dialect.
 /// </summary>
 /// <param name="instance">The instance.</param>
 /// <returns>FirebirdSqlPersistenceWireup.</returns>
 public virtual FirebirdSqlPersistenceWireup WithDialect(IContribSqlDialect instance)
 {
     this.Container.Register(instance);
     return(this);
 }
		/// <summary>
		/// Withes the dialect.
		/// </summary>
		/// <param name="instance">The instance.</param>
		/// <returns>FirebirdSqlPersistenceWireup.</returns>
		public virtual FirebirdSqlPersistenceWireup WithDialect(IContribSqlDialect instance)
		{
			this.Container.Register(instance);
			return this;
		}