mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Some README typos
This commit is contained in:
parent
e4bcc27463
commit
e95294d044
@ -48,7 +48,7 @@ for (const auto& row: db.run(select(foo.name, foo.hasFun).from(foo).where(foo.id
|
|||||||
}
|
}
|
||||||
|
|
||||||
// selecting ALL columns of a table
|
// selecting ALL columns of a table
|
||||||
for (const auto& row: db.run(select(all_of(foo)).from(foo).where(hasFun or foo.name == "joker")))
|
for (const auto& row: db.run(select(all_of(foo)).from(foo).where(foo.hasFun or foo.name == "joker")))
|
||||||
{
|
{
|
||||||
int64_t id = row.id; // numeric fields are implicitly convertible to numeric c++ types
|
int64_t id = row.id; // numeric fields are implicitly convertible to numeric c++ types
|
||||||
}
|
}
|
||||||
@ -73,7 +73,7 @@ db.run(insert_into(foo).set(foo.id = 17, foo.name = "bar", foo.hasFun = true));
|
|||||||
db.run(update(foo).set(foo.hasFun = not foo.hasFun).where(foo.name != "nobody"));
|
db.run(update(foo).set(foo.hasFun = not foo.hasFun).where(foo.name != "nobody"));
|
||||||
|
|
||||||
// A sample delete
|
// A sample delete
|
||||||
db.run(remove_from(tab).where(not tab.hasFun));
|
db.run(remove_from(foo).where(not foo.hasFun));
|
||||||
```
|
```
|
||||||
|
|
||||||
Requirements:
|
Requirements:
|
||||||
|
Loading…
Reference in New Issue
Block a user