public void AddMemberEntry(KDPgValueType memberType) { fieldsCount += 1; Entries.Add(new Entry { MemberPgType = memberType, }); }
public static TypedExpression CastJsonToType(TypedExpression value, KDPgValueType pgType) { RawQuery rq = new RawQuery(); rq.Append("("); rq.AppendSurround(value.RawQuery); rq.Append("#>>'{}')::"); rq.Append(pgType.PostgresTypeName); return(new TypedExpression(rq, pgType)); }
public KdPgColumnDescriptor(string name, KDPgColumnFlagsEnum flags, KDPgValueType type, PropertyInfo propertyInfo, KdPgTableDescriptor table) { Name = name; Flags = flags; Type = type; PropertyInfo = propertyInfo; Table = table; var rq = new RawQuery(); rq.AppendColumn(this, new RawQuery.TableNamePlaceholder(table, table.Name)); TypedExpression = new TypedExpression(rq, type); }
public RawQuery AppendWithCast(RawQuery query, KDPgValueType pgType) { return(AppendWithCast(query, pgType.PostgresTypeName)); }
// ReSharper disable ParameterOnlyUsedForPreconditionCheck.Local private static void AssertPath <TModel>(PathInfo pi, string columnName, string query, KDPgValueType type) { Assert.Equal(type, pi.Expression.Type); Assert.Equal(query, pi.Expression.RawQuery.ToString()); Assert.Equal(ModelsRegistry.GetTable <TModel>().Columns.Find(x => x.Name == columnName), pi.Column); }
public SingleValueSelectResultProcessor(KDPgValueType type) { _type = type; }
private static TypedExpression BinaryOperator(string op, TypedExpression left, TypedExpression right, KDPgValueType outType) { RawQuery rq = new RawQuery(); rq.AppendSurround(left.RawQuery); rq.Append($" {op} "); rq.AppendSurround(right.RawQuery); return(new TypedExpression(rq, outType)); }
public TypedExpression(RawQuery rawQuery, KDPgValueType type) { RawQuery = rawQuery; Type = type; }
public PgValue(object value, KDPgValueType type) { Value = value; Type = type; }