Package com.youtube.vitess.vtgate

Examples of com.youtube.vitess.vtgate.Field


    for (Object field : fields) {
      BSONObject fieldBson = (BSONObject) field;
      String fieldName = new String((byte[]) fieldBson.get("Name"));
      int mysqlType = Ints.checkedCast((Long) fieldBson.get("Type"));
      FieldType fieldType = FieldType.get(mysqlType);
      fieldList.add(new Field(fieldName, fieldType));
    }
    return fieldList;
  }
View Full Code Here


      LinkedList<Cell> cells = new LinkedList<>();
      BasicBSONList cols = (BasicBSONList) row;
      Iterator<Field> fieldsIter = fields.iterator();
      for (Object col : cols) {
        byte[] val = col != null ? (byte[]) col : null;
        Field field = fieldsIter.next();
        FieldType ft = field.getType();
        cells.add(new Cell(field.getName(), ft.convert(val), ft.javaType));
      }
      rowList.add(new Row(cells));
    }
    return rowList;
  }
View Full Code Here

TOP

Related Classes of com.youtube.vitess.vtgate.Field

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.