【发布时间】:2016-09-22 05:05:08
【问题描述】:
朋友们,美好的一天。我正在使用pqxx,但我有一些问题。
1.我有两张桌子:
table1 (table1_id integer) and table2 (table1_id integer, another_id integer) 具有一对多的关系。
如何轻松获取视图中的信息,例如:table1_id、向量 another_ids?
现在我在脚本中使用序列化(字符串连接到“%d %d %d ...”)并在我的 c++ 代码中反序列化。
我还需要在 table1 中插入值。以及如何在一笔交易中做到这一点?
2。我把存储过程称为
t.exec("SELECT * FROM my_proc(some_argument)");
可能存在任何方式来做到这一点,就像在 c# 中一样?
非常感谢!
【问题讨论】:
标签: c# c++ sql stored-procedures libpqxx