Skip to content

Commit 229ee79

Browse files
committed
bind variables
1 parent 28ef787 commit 229ee79

12 files changed

Lines changed: 2157 additions & 55 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*+*****************************************************************************
2+
* ___ _ ____ ____
3+
* / _ \ _ _ ___ ___| |_| _ \| __ )
4+
* | | | | | | |/ _ \/ __| __| | | | _ \
5+
* | |_| | |_| | __/\__ \ |_| |_| | |_) |
6+
* \__\_\\__,_|\___||___/\__|____/|____/
7+
*
8+
* Copyright (c) 2014-2019 Appsicle
9+
* Copyright (c) 2019-2026 QuestDB
10+
*
11+
* Licensed under the Apache License, Version 2.0 (the "License");
12+
* you may not use this file except in compliance with the License.
13+
* You may obtain a copy of the License at
14+
*
15+
* http://www.apache.org/licenses/LICENSE-2.0
16+
*
17+
* Unless required by applicable law or agreed to in writing, software
18+
* distributed under the License is distributed on an "AS IS" BASIS,
19+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20+
* See the License for the specific language governing permissions and
21+
* limitations under the License.
22+
*
23+
******************************************************************************/
24+
25+
package io.questdb.client.cutlass.qwp.client;
26+
27+
/**
28+
* Callback that populates the typed bind parameters of a single
29+
* {@link QwpQueryClient#execute(String, QwpBindSetter, QwpColumnBatchHandler)}
30+
* invocation. The callback runs on the user thread while the client prepares
31+
* the QUERY_REQUEST frame; the encoded bind bytes are then handed to the I/O
32+
* thread for transmission.
33+
* <p>
34+
* Implementations must call the typed setters on the supplied
35+
* {@link QwpBindValues} in strictly ascending index order starting at 0, with
36+
* no gaps. The client validates this and throws on violation.
37+
*/
38+
@FunctionalInterface
39+
public interface QwpBindSetter {
40+
/**
41+
* Populates the supplied bind-value sink. Callers must invoke the typed
42+
* setters in ascending index order (0, 1, 2, ...).
43+
*/
44+
void apply(QwpBindValues binds);
45+
}

0 commit comments

Comments
 (0)