示例#1
0
        private static void ToDbTimestamp(StringBuilder queryBuilder, ConstantExpression ce)
        {
            var dt = (DateTime)ce.Value;

            queryBuilder.Append("'");
            queryBuilder.Append(TimestampConverter.ToDatabase(dt));
            queryBuilder.Append("'::timestamptz");
        }
示例#2
0
 private static void CurrentUtcTimestamp(MemberExpression memberCall, StringBuilder queryBuilder, Action <Expression> visitExpression, QueryContext context)
 {
     if (context.CanUseParams)
     {
         queryBuilder.Append("'");
         queryBuilder.Append(TimestampConverter.ToDatabase(context.Time.Value.UtcNow));
         queryBuilder.Append("'::timestamptz");
     }
     else
     {
         queryBuilder.Append("CURRENT_TIMESTAMP");
     }
 }