MCPcopy
hub / github.com/questdb/questdb / TestRecord

Class TestRecord

core/src/test/java/io/questdb/test/cairo/TestRecord.java:31–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29import io.questdb.std.Rnd;
30
31public class TestRecord implements Record {
32 final ArrayBinarySequence abs = new ArrayBinarySequence().of(new byte[1024]);
33 final Rnd rnd = new Rnd();
34
35 @Override
36 public BinarySequence getBin(int col) {
37 if (rnd.nextPositiveInt() % 32 == 0) {
38 return null;
39 }
40 for (int i = 0, n = abs.array.length; i < n; i++) {
41 abs.array[i] = rnd.nextByte();
42 }
43 return abs;
44 }
45
46 @Override
47 public boolean getBool(int col) {
48 return rnd.nextBoolean();
49 }
50
51 @Override
52 public byte getByte(int col) {
53 return rnd.nextByte();
54 }
55
56 @Override
57 public long getDate(int col) {
58 return rnd.nextPositiveLong();
59 }
60
61 @Override
62 public double getDouble(int col) {
63 return rnd.nextDouble();
64 }
65
66 @Override
67 public float getFloat(int col) {
68 return rnd.nextFloat();
69 }
70
71 @Override
72 public int getInt(int col) {
73 return rnd.nextInt();
74 }
75
76 @Override
77 public long getLong(int col) {
78 return rnd.nextLong();
79 }
80
81 @Override
82 public long getRowId() {
83 return -1;
84 }
85
86 @Override
87 public short getShort(int col) {
88 return rnd.nextShort();

Callers

nothing calls this directly

Calls 1

ofMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…