lbonn / sql-file

Demo code and presentation for Berlin C++ BBQ on 2019-07-18

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SQL-file

This is a small example application to illustrate how to manage an application using SQLite as a file format.

Relevant link: https://www.sqlite.org/appfileformat.html

Demo

sample_v0.conv contains conversion rates from euro to usd, in the v0 format sample_v1.conv contains conversion rates from euro to usd and euro to yen, in the v1 format

mkdir build
(cd build && cmake .. -GNinja && cmake --build . && ctest -V)

# all of these work
./build/currency_convert_v0 data/sample_v0.conv eurusd 2012-12-12 1
./build/currency_convert_v0 data/sample_v1.conv eurusd 2012-12-12 1
./build/currency_convert_v1 data/sample_v0.conv eurusd 2012-12-12 1
./build/currency_convert_v1 data/sample_v1.conv eurusd 2012-12-12 1
./build/currency_convert_v1 data/sample_v1.conv eurjpy 2012-12-12 1

# these don't
./build/currency_convert_v0 data/sample_v1.conv eurjpy 2012-12-12 1
./build/currency_convert_v1 data/sample_v1.conv eurusd 2020-01-01 1

Slides

Slides for the presentation on the C++ Meetup Berlin are in slides/

Or browse at https://lbonn.github.io/sql-file/

License

This code is licensed under the link:LICENSE[Mozilla Public License 2.0], a copy of which can be found in this repository.

Significant portions are derived from the aktualizr code base, licensed on the same terms and copyright HERE Europe B.V., 2016-2019.

About

Demo code and presentation for Berlin C++ BBQ on 2019-07-18

License:Mozilla Public License 2.0


Languages

Language:C++ 48.1%Language:CSS 26.2%Language:Python 17.4%Language:CMake 4.4%Language:Makefile 2.0%Language:Shell 1.8%