Package com.impossibl.postgres.api.data

Examples of com.impossibl.postgres.api.data.Tid


        }

      } },
      {"inet", new InetAddr("2001:4f8:3:ba:2e0:81ff:fe22:d1f1/10")},
      {"cidr", new CidrAddr("2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128")},
      {"tid", new PGRowId(new Tid(0, (short) 1))},
    };

    List<Object[]> data = new ArrayList<>();

    //Combine entries with generated ones for array and composite testing
View Full Code Here


    }

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

      Tid tid = (Tid) val;

      buffer.append('(').append(tid.block).append(',').append(tid.offset).append(')');
    }
View Full Code Here

      }

      int block = buffer.readInt();
      short offset = buffer.readShort();

      return new Tid(block, offset);
    }
View Full Code Here

        buffer.writeInt(-1);
      }
      else {

        Tid tid = (Tid) val;

        buffer.writeInt(6);
        buffer.writeInt(tid.block);
        buffer.writeShort(tid.offset);
      }
View Full Code Here

      String[] items = buffer.subSequence(1, buffer.length() - 1).toString().split(",");

      int block = Integer.parseInt(items[0]);
      short offset = Short.parseShort(items[1]);

      return new Tid(block, offset);
    }
View Full Code Here

TOP

Related Classes of com.impossibl.postgres.api.data.Tid

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.