Exemple #1
0
        public static RawQuery Create(PgValue value)
        {
            var rq = new RawQuery();

            rq.Append(value);
            return(rq);
        }
Exemple #2
0
 public RawQuery AppendSurround(RawQuery rawQuery)
 {
     Append("(");
     Append(rawQuery);
     Append(")");
     return(this);
 }
Exemple #3
0
        public static RawQuery Create(params string[] texts)
        {
            var rq = new RawQuery();

            rq.Append(texts);
            return(rq);
        }
Exemple #4
0
 public RawQuery AppendFuncInvocation(string funcName, RawQuery rawQuery)
 {
     Append(funcName);
     Append("(");
     Append(rawQuery);
     Append(")");
     return(this);
 }
Exemple #5
0
 public RawQuery Append(RawQuery rawQuery)
 {
     _parts.Add(new QueryPart()
     {
         RawQuery = rawQuery,
     });
     return(this);
 }
Exemple #6
0
        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);
        }
Exemple #7
0
        public RawQuery AppendWithCast(RawQuery query, string castType = null)
        {
            RawQuery q = new RawQuery();

            if (castType == null)
            {
                q.Append(query);
            }
            else
            {
                q.Append("(");
                q.Append(query);
                q.Append(")");
                q.Append("::", castType);
            }

            Append(q);

            return(this);
        }
Exemple #8
0
 public RawQuery AppendWithCast(RawQuery query, KDPgValueType pgType)
 {
     return(AppendWithCast(query, pgType.PostgresTypeName));
 }
 public static TypedExpression FromPgValue(PgValue value)
 {
     return(new TypedExpression(RawQuery.Create(value), value.Type));
 }
 public TypedExpression(RawQuery rawQuery, KDPgValueType type)
 {
     RawQuery = rawQuery;
     Type     = type;
 }