You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@horaedb.apache.org by "xxaier (via GitHub)" <gi...@apache.org> on 2024/12/24 12:27:49 UTC
Re: [D] ceresdb笔记/文档需要补充的地方/小的需求想法 [horaedb]
GitHub user xxaier closed a discussion: ceresdb笔记/文档需要补充的地方/小的需求想法
## ceresdb笔记/文档需要补充的地方
1. overwite/APPEND模式的介绍 (默认是overwite模式?)
2. PRIMARY KEY(ts) 和 PRIMARY KEY(id, ts) 的区别 (在更新的模式为 overwrite 的情况下 主键保证不可以重复)
PRIMARY KEY 必须要包含 ts 列
## 小的需求想法
1. 支持escape的sql查询
类似 https://docs.rs/tokio-postgres/latest/tokio_postgres/
```
let id = "SOME DATA FROM THE USER";
let rows = client
.query("SELECT * FROM SomeTable WHERE id = $1", &[&id])
.await?;
```
有时候参数是来自用户的输入,直接format! 容易被sql注入
比如记录用户的的浏览器头,sec-ch-ua: "Not:A-Brand";v="99", "Chromium";v="112" 这是一个文本字段,还有引号,而且是用户输入的,不escape就没法存入
GitHub link: https://github.com/apache/horaedb/discussions/1018
----
This is an automatically sent email for commits@horaedb.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@horaedb.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For additional commands, e-mail: commits-help@horaedb.apache.org