From 54a0d6fc7c2835e08fc6c245e983e128ad60e2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cdigitalist=2Eru=E2=80=9D?= <“strangeqargo@gmail.com”> Date: Sat, 19 Mar 2016 21:13:16 +0300 Subject: [PATCH 1/4] adding basic usage examples --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 3b4c0efd..8565b2f4 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,16 @@ sqlpp11 requires a certain api in order to connect with the database, see databa __Date Library:__ sqlpp11 requires [Howard Hinnant's date library](https://github.com/HowardHinnant/date) for `date` and `date_time` data types. +__Linux install:__ +git clone date library, needed connectors, cmake and make install them. + +__Basic usage:__ +create DDL files (mysql: 'show create table MyTable'), create headers for them with provided python script: +``` +%sqlpp11_dir%/scripts/ddl2cpp ~/temp/MyTable.ddl ~/temp/MyTable %DatabaseNamespaceForExample% +``` +include generated header (MyTable.h), that's all + To demonstrate that sqlpp11 can work with other backends as well, here is an experimental backend for structs in standard containers: * STL Container: https://github.com/rbock/sqlpp11-connector-stl From 6621822fd2c70a445bec7d0a0b1c14925878834b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cdigitalist=2Eru=E2=80=9D?= <“strangeqargo@gmail.com”> Date: Sat, 19 Mar 2016 21:19:15 +0300 Subject: [PATCH 2/4] fix formatting for basic usage --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8565b2f4..82879962 100644 --- a/README.md +++ b/README.md @@ -129,11 +129,12 @@ sqlpp11 requires a certain api in order to connect with the database, see databa __Date Library:__ sqlpp11 requires [Howard Hinnant's date library](https://github.com/HowardHinnant/date) for `date` and `date_time` data types. +Basic usage: +------------- __Linux install:__ git clone date library, needed connectors, cmake and make install them. -__Basic usage:__ -create DDL files (mysql: 'show create table MyTable'), create headers for them with provided python script: +create DDL files (like mysql: 'show create table MyDatabase.MyTable', but remove backticks), create headers for them with provided python script: ``` %sqlpp11_dir%/scripts/ddl2cpp ~/temp/MyTable.ddl ~/temp/MyTable %DatabaseNamespaceForExample% ``` From a567e3ca9927decbc81433d6d33d5261447712fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cdigitalist=2Eru=E2=80=9D?= <“strangeqargo@gmail.com”> Date: Sat, 19 Mar 2016 21:20:05 +0300 Subject: [PATCH 3/4] minor fix --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 82879962..bf2722fe 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,10 @@ sqlpp11 requires a certain api in order to connect with the database, see databa * Sqlite3: https://github.com/rbock/sqlpp11-connector-sqlite3 * PostgreSQL: https://github.com/matthijs/sqlpp11-connector-postgresql +To demonstrate that sqlpp11 can work with other backends as well, here is an experimental backend for structs in standard containers: + + * STL Container: https://github.com/rbock/sqlpp11-connector-stl + __Date Library:__ sqlpp11 requires [Howard Hinnant's date library](https://github.com/HowardHinnant/date) for `date` and `date_time` data types. @@ -140,9 +144,7 @@ create DDL files (like mysql: 'show create table MyDatabase.MyTable', but remove ``` include generated header (MyTable.h), that's all -To demonstrate that sqlpp11 can work with other backends as well, here is an experimental backend for structs in standard containers: - * STL Container: https://github.com/rbock/sqlpp11-connector-stl __License:__ From 45d9045260155270bdbd6c61f7bc1340ee33c19d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cdigitalist=2Eru=E2=80=9D?= <“strangeqargo@gmail.com”> Date: Sat, 19 Mar 2016 21:47:54 +0300 Subject: [PATCH 4/4] license header fix --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bf2722fe..9325106e 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,6 @@ create DDL files (like mysql: 'show create table MyDatabase.MyTable', but remove include generated header (MyTable.h), that's all - -__License:__ - +License: +------------- sqlpp11 is distributed under the [BSD 2-Clause License](https://github.com/rbock/sqlpp11/blob/master/LICENSE).