/// <summary>
        /// Bind the appropriate value into the given statement at the specified position.
        /// </summary>
        /// <param name="statement">The statement into which the value should be bound.</param>
        /// <param name="qp">The defined values for the current query execution.</param>
        /// <param name="session">The session against which the current execution is occuring.</param>
        /// <param name="position">The position from which to start binding value(s).</param>
        /// <returns>The number of sql bind positions "eaten" by this bind operation.</returns>
        public override int  Bind(IDbCommand statement, Engine.QueryParameters qp, Engine.ISessionImplementor session, int position)
        {
            IType  type  = qp.PositionalParameterTypes[_hqlPosition];
            Object value = qp.PositionalParameterValues[_hqlPosition];

            type.NullSafeSet(statement, value, position, session);
            return(type.GetColumnSpan(session.Factory));
        }
示例#2
0
 public override Task <object> HydrateAsync(DbDataReader rs, string[] names, Engine.ISessionImplementor session, object owner, CancellationToken cancellationToken)
 {
     if (cancellationToken.IsCancellationRequested)
     {
         return(Task.FromCanceled <object>(cancellationToken));
     }
     try
     {
         return(GetIdentifierOrUniqueKeyType(session.Factory).NullSafeGetAsync(rs, names, session, owner, cancellationToken));
     }
     catch (Exception ex)
     {
         return(Task.FromException <object>(ex));
     }
 }
示例#3
0
 public override IResultSetsCommand GetResultSetsCommand(Engine.ISessionImplementor session)
 {
     return(new BasicResultSetsCommand(session));
 }
示例#4
0
 public override object Hydrate(DbDataReader rs, string[] names, Engine.ISessionImplementor session, object owner)
 {
     return(GetIdentifierOrUniqueKeyType(session.Factory).NullSafeGet(rs, names, session, owner));
 }
示例#5
0
 public override void MapModifiedFlagsToMapFromEntity(Engine.ISessionImplementor session, System.Collections.Generic.IDictionary <string, object> data, object newObj, object oldObj)
 {
 }
示例#6
0
 public override object Seed(Engine.ISessionImplementor session)
 {
     return(DateTime.Now);
 }
示例#7
0
 public override object Next(object current, Engine.ISessionImplementor session)
 {
     return(Seed(session));
 }