Skip to content

Commit f70a351

Browse files
committed
Add Insert statement example on README
1 parent 3c9817a commit f70a351

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,8 @@ Retrieve inserted values using a SQL syntax. This method corresponds to a POST r
12041204

12051205
#### Request example
12061206

1207+
**Query statement**
1208+
12071209
```java
12081210
import java.io.IOException;
12091211
import java.util.concurrent.ExecutionException;
@@ -1222,6 +1224,25 @@ public class Example {
12221224
}
12231225
```
12241226

1227+
**Insert statement**
1228+
```java
1229+
import java.io.IOException;
1230+
import java.util.concurrent.ExecutionException;
1231+
import java.util.concurrent.Future;
1232+
import org.asynchttpclient.Response;
1233+
1234+
public class Example {
1235+
1236+
public static void main(String[] args) throws InterruptedException, ExecutionException, IOException {
1237+
final SlicingDice slicingDice = new SlicingDice("MASTER_OR_READ_API_KEY");
1238+
final Future<Response> result = slicingDice.sql("INSERT INTO default([entity-id], name, age) VALUES(1, 'john', 10)");
1239+
System.out.println(result.get().getResponseBody());
1240+
1241+
slicingDice.close();
1242+
}
1243+
}
1244+
```
1245+
12251246
#### Output example
12261247

12271248
```json

0 commit comments

Comments
 (0)