|
1 | 1 | package com.xxdb;
|
2 | 2 |
|
3 | 3 | import com.alibaba.fastjson2.JSONObject;
|
| 4 | +import com.xxdb.data.Dictionary; |
4 | 5 | import com.xxdb.data.Vector;
|
5 | 6 | import com.xxdb.data.*;
|
6 | 7 | import com.xxdb.io.Double2;
|
@@ -1410,6 +1411,24 @@ public void testDictionaryUpload() throws IOException {
|
1410 | 1411 | assertEquals(3, dict1.rows());
|
1411 | 1412 | }
|
1412 | 1413 | @Test
|
| 1414 | + public void testDictionaryUpload_1() throws IOException { |
| 1415 | + DBConnection conn = new DBConnection(); |
| 1416 | + conn.connect(HOST,PORT); |
| 1417 | + BasicDictionary bd = new BasicDictionary(Entity.DATA_TYPE.DT_INT, Entity.DATA_TYPE.DT_ANY); |
| 1418 | + Map<String,Entity> data = new HashMap<>(); |
| 1419 | + data.put("bd",bd); |
| 1420 | + conn.upload(data); |
| 1421 | + Dictionary re= (Dictionary) conn.run("bd"); |
| 1422 | + System.out.println(re.getString()); |
| 1423 | + assertEquals("", re.getString()); |
| 1424 | + bd.put(new BasicInt(1),new BasicInt(1)); |
| 1425 | + data.put("bd",bd); |
| 1426 | + conn.upload(data); |
| 1427 | + Dictionary re1= (Dictionary) conn.run("bd"); |
| 1428 | + System.out.println(re1.getString()); |
| 1429 | + assertEquals("1->1\n", re1.getString()); |
| 1430 | + } |
| 1431 | + @Test |
1413 | 1432 | public void testDurationUpload() throws IOException {
|
1414 | 1433 | Entity duration = conn.run("duration(3XNYS)");
|
1415 | 1434 | Map<String, Entity> map = new HashMap<String, Entity>();
|
|
0 commit comments