public virtual void AddParameter(string name, object value, DbType?parameterType = null)
 {
     if (Logger.IsDebugEnabled)
     {
         Logger.Debug(Messages.AddingParameter, name);
     }
     Parameters[name] = Tuple.Create(_dialect.CoalesceParameterValue(value), parameterType);
 }
 public virtual IEnumerable <IStreamHead> GetStreamsToSnapshot(string bucketId, int maxThreshold)
 {
     Logger.Debug(Messages.GettingStreamsToSnapshot);
     return(ExecuteQuery(query =>
     {
         string statement = _dialect.GetStreamsRequiringSnapshots;
         query.AddParameter(_dialect.BucketId, bucketId);
         query.AddParameter(_dialect.Threshold, maxThreshold);
         return
         query.ExecutePagedQuery(statement,
                                 (q, s) => q.SetParameter(_dialect.StreamId, _dialect.CoalesceParameterValue(s.StreamId())))
         .Select(x => x.GetStreamToSnapshot());
     }));
 }
 public virtual void AddParameter(string name, object value)
 {
     Logger.Debug(Messages.AddingParameter, name);
     Parameters[name] = _dialect.CoalesceParameterValue(value);
 }