Esempio n. 1
0
        public static RawQuery Create(PgValue value)
        {
            var rq = new RawQuery();

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

            rq.Append(texts);
            return(rq);
        }
Esempio n. 4
0
 public RawQuery AppendFuncInvocation(string funcName, RawQuery rawQuery)
 {
     Append(funcName);
     Append("(");
     Append(rawQuery);
     Append(")");
     return(this);
 }
Esempio n. 5
0
 public RawQuery Append(RawQuery rawQuery)
 {
     _parts.Add(new QueryPart()
     {
         RawQuery = rawQuery,
     });
     return(this);
 }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 8
0
 public RawQuery AppendWithCast(RawQuery query, KDPgValueType pgType)
 {
     return(AppendWithCast(query, pgType.PostgresTypeName));
 }
Esempio n. 9
0
 public static TypedExpression FromPgValue(PgValue value)
 {
     return(new TypedExpression(RawQuery.Create(value), value.Type));
 }
Esempio n. 10
0
 public TypedExpression(RawQuery rawQuery, KDPgValueType type)
 {
     RawQuery = rawQuery;
     Type     = type;
 }