Package com.youtube.vitess.vtgate.cursor

Examples of com.youtube.vitess.vtgate.cursor.CursorImpl


      session = response.getSession();
    }
    if (query.isStreaming()) {
      return new StreamCursor(response.getResult(), client);
    }
    return new CursorImpl(response.getResult());
  }
View Full Code Here


    if (response.getSession() != null) {
      session = response.getSession();
    }
    List<Cursor> cursors = new LinkedList<>();
    for (QueryResult qr : response.getResults()) {
      cursors.add(new CursorImpl(qr));
    }
    return cursors;
  }
View Full Code Here

      rows.add(row);
    }
    result.put("Rows", rows);

    QueryResult qr = Bsonify.bsonToQueryResult(result, null);
    Cursor cursor = new CursorImpl(qr);
    Assert.assertEquals(12L, cursor.getRowsAffected());
    Assert.assertEquals(12345L, cursor.getLastRowId());

    Row firstRow = cursor.next();
    Cell cell0 = firstRow.next();
    Assert.assertEquals("col_0", cell0.getName());
    Assert.assertEquals(BigDecimal.class, cell0.getType());
    Assert.assertEquals(new BigDecimal("0.0"), firstRow.getBigDecimal(cell0.getName()));
View Full Code Here

TOP

Related Classes of com.youtube.vitess.vtgate.cursor.CursorImpl

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.