5 Star 6 Fork 0

浙江智臾科技有限公司/api-java

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
InsertIntoDemo.java 767 Bytes
一键复制 编辑 原始数据 按行查看 历史
笨笨 提交于 2023-12-12 15:32 +08:00 . fix bugs of examples code.
package examples;
import com.xxdb.*;
import com.xxdb.data.BasicTable;
import java.io.IOException;
/**
* insert into can only be applied to in-memory table
*/
public class InsertIntoDemo {
public static void main(String[] args) throws IOException {
DBConnection conn = new DBConnection();
conn.connect("localhost", 8848, "admin", "123456");
conn.run("t = table(10000:0,`cstring`cint`ctimestamp`cdouble,[STRING,INT,TIMESTAMP,DOUBLE])\n" +
"share t as sharedTable");
conn.run(String.format("insert into sharedTable values(['IBM', 100, 2012.06.13 13:30:10.008, 3.14])"));
BasicTable basicTable = (BasicTable) conn.run("select * from sharedTable");
System.out.println(basicTable.getString());
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dolphindb/api-java.git
git@gitee.com:dolphindb/api-java.git
dolphindb
api-java
api-java
master

搜索帮助