Package com.impossibl.postgres.types

Examples of com.impossibl.postgres.types.RangeType


    }

    @Override
    public void encode(Type type, StringBuilder buffer, Object val, Context context) throws IOException {

      RangeType rangeType = (RangeType) type;
      Type baseType = rangeType.getBase();

      Range<?> range = (Range<?>) val;

      if (range.isLowerBoundInclusive()) {
        buffer.append('[');
View Full Code Here


    }

    @Override
    public Range<?> decode(Type type, Short typeLength, Integer typeModifier, ByteBuf buffer, Context context) throws IOException {

      RangeType rangeType = (RangeType) type;
      Type baseType = rangeType.getBase();

      Range<?> instance = null;

      int length = buffer.readInt();
View Full Code Here

      if (val != null) {

        int writeStart = buffer.writerIndex();

        RangeType rangeType = (RangeType) type;
        Type baseType = rangeType.getBase();

        Range<?> range = (Range<?>) val;

        buffer.writeByte(range.getFlags().getValue());
View Full Code Here

    }

    @Override
    public Range<?> decode(Type type, Short typeLength, Integer typeModifier, CharSequence buffer, Context context) throws IOException {

      RangeType rangeType = (RangeType) type;
      Type baseType = rangeType.getBase();

      boolean lowerInc = false, upperInc = false;
      Object lower = null, upper = null;

      if (buffer.charAt(0) == '[') {
View Full Code Here

TOP

Related Classes of com.impossibl.postgres.types.RangeType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.