private static void ToDbTimestamp(StringBuilder queryBuilder, ConstantExpression ce) { var dt = (DateTime)ce.Value; queryBuilder.Append("'"); queryBuilder.Append(TimestampConverter.ToDatabase(dt)); queryBuilder.Append("'::timestamptz"); }
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"); } }