mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-16 04:47:18 +08:00
993ddcc049
Copied wiki into docs directory This allows developers to open pull requests to edit documentation and also use mkdocs to create a styled HTML version * changed wiki links to relative links * removed Planned-Features.md * removed reference to planned features in Home.md
18 lines
725 B
Markdown
18 lines
725 B
Markdown
Haven't found the time to document this in any detail, yet, but this is an example:
|
|
|
|
```C++
|
|
db(insert_into(tab).set(tab.gamma = true));
|
|
```
|
|
|
|
This is how you could insert multiple rows at a time:
|
|
|
|
```C++
|
|
auto multi_insert = insert_into(t).columns(t.gamma, t.beta, t.delta);
|
|
multi_insert.values.add(t.gamma = true, t.beta = "cheesecake", t.delta = 1);
|
|
multi_insert.values.add(t.gamma = sqlpp::default_value, t.beta = sqlpp::default_value,
|
|
t.delta = sqlpp::default_value);
|
|
multi_insert.values.add(t.gamma = sqlpp::value_or_null(true),
|
|
t.beta = sqlpp::value_or_null("pie"),
|
|
t.delta = sqlpp::value_or_null<sqlpp::integer>(sqlpp::null));
|
|
db(multi_insert);
|
|
``` |