diff --git a/doc/basics.html b/doc/connections.html similarity index 84% rename from doc/basics.html rename to doc/connections.html index 4da2077e4..9e02b3a27 100644 --- a/doc/basics.html +++ b/doc/connections.html @@ -3,7 +3,7 @@ - SOCI - basics + SOCI - connections @@ -112,49 +112,19 @@

Connecting to the database

-

Simple SQL statements

- -

In many cases, the SQL query is intended to be executed only once, -which means that statement parsing and execution can go together. -The session class provides a special once -member, which triggers parsing and execution of such one-time -statements:

- -
-sql.once << "drop table persons";
-
- -

For shorter syntax, the following form is also allowed:

- -
-sql << "drop table persons";
-
- -

The IOStream-like interface is exactly what it looks like, so that -the -statement text can be composed of many parts, involving anything that -is streamable (including custom classes, if they have -appropriate operator<<):

- -
-string tableName = "persons";
-sql << "drop table " << tableName;
-
-int id = 123;
-sql << "delete from companies where id = " << id;
-
- + + diff --git a/doc/index.html b/doc/index.html index b1b53254b..eef45b19a 100644 --- a/doc/index.html +++ b/doc/index.html @@ -15,7 +15,8 @@

Documentation and tutorial

Structure
Installation
Errors
-Connections and simple queries
+Connections
+Queries
Exchanging data
Statements, procedures and transactions
Multithreading and SOCI
diff --git a/doc/queries.html b/doc/queries.html new file mode 100644 index 000000000..650c328c3 --- /dev/null +++ b/doc/queries.html @@ -0,0 +1,60 @@ + + + + + + SOCI - queries + + + + + +

Queries

+ +

Simple SQL statements

+ +

In many cases, the SQL query is intended to be executed only once, +which means that statement parsing and execution can go together. +The session class provides a special once +member, which triggers parsing and execution of such one-time +statements:

+ +
+sql.once << "drop table persons";
+
+ +

For shorter syntax, the following form is also allowed:

+ +
+sql << "drop table persons";
+
+ +

The IOStream-like interface is exactly what it looks like, so that +the +statement text can be composed of many parts, involving anything that +is streamable (including custom classes, if they have +appropriate operator<<):

+ +
+string tableName = "persons";
+sql << "drop table " << tableName;
+
+int id = 123;
+sql << "delete from companies where id = " << id;
+
+ + + + + + + + + + + +