Skip to content

Commit 749a53f

Browse files
committed
Remove QwpTableBuffer designation as public API
1 parent bc2334d commit 749a53f

1 file changed

Lines changed: 2 additions & 26 deletions

File tree

core/src/main/java/io/questdb/client/cutlass/qwp/client/QwpWebSocketSender.java

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -84,25 +84,6 @@
8484
* sender.flush();
8585
* }
8686
* </pre>
87-
* <p>
88-
* <h2>Fast-path API for high-throughput generators</h2>
89-
* <p>
90-
* For maximum throughput, bypass the fluent API to avoid per-row overhead
91-
* (no column-name hashmap lookups, no {@code checkNotClosed()}/{@code checkTableSelected()}
92-
* per column, direct access to column buffers). The entry point is
93-
* {@link #getTableBuffer(String)}.
94-
* <pre>
95-
* // Setup (once)
96-
* QwpTableBuffer tableBuffer = sender.getTableBuffer("q");
97-
* QwpTableBuffer.ColumnBuffer colSymbol = tableBuffer.getOrCreateColumn("s", TYPE_SYMBOL, true);
98-
* QwpTableBuffer.ColumnBuffer colBid = tableBuffer.getOrCreateColumn("b", TYPE_DOUBLE, false);
99-
*
100-
* // Hot path (per row)
101-
* colSymbol.addSymbolWithGlobalId(symbol, sender.getOrAddGlobalSymbol(symbol));
102-
* colBid.addDouble(bid);
103-
* tableBuffer.nextRow();
104-
* sender.incrementPendingRowCount();
105-
* </pre>
10687
*/
10788
public class QwpWebSocketSender implements Sender {
10889

@@ -723,16 +704,11 @@ public int getPendingRowCount() {
723704
return pendingRowCount;
724705
}
725706

726-
/**
727-
* <strong>DANGER:</strong>: gets or creates a low-level table buffer,
728-
* allowing you to bypass some validation and enforcement of invariants
729-
* present in the higher-level API. When used incorrectly, it may result
730-
* in silent data loss.
731-
*/
707+
@TestOnly
732708
public QwpTableBuffer getTableBuffer(String tableName) {
733709
QwpTableBuffer buffer = tableBuffers.get(tableName);
734710
if (buffer == null) {
735-
buffer = new QwpTableBuffer(tableName);
711+
buffer = new QwpTableBuffer(tableName, this);
736712
tableBuffers.put(tableName, buffer);
737713
}
738714
currentTableBuffer = buffer;

0 commit comments

Comments
 (0)