1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
# This snippet explains all options for the sqlite3 database backend.
# solarpowerlog uses CppDB as its database abstraction library.
# To get additional hints about configuration options,
# see http://cppcms.com/sql/cppdb/backendref.html
# and http://cppcms.com/sql/cppdb/connstr.html.
# NOTE: This snippet is designed to be included in the logger section.
# Example use:
/*
logger:
{
loggers = (
{
# We want to have a DBWriter:
type = "DBWriter";
# This DB Writer is known as (required)
name = "DBWriter_tst";
# It is of type
# And gets its data from
datasource = "Simulator";
@include "solarpowerlog-sqlite3.conf"
(...)
*/
# Ok here we go...
### sqlite3 ###
# CppDB documentation for the sqlite3 backend:
# http://cppcms.com/sql/cppdb/sqlite3.html
# For sqlite3 you need this:
db_type="sqlite3"
# (REQUIRED) database file
db_database="/tmp/solarpowerlog.sqlite3";
# mode to open the database.
# "create" (default) create if db does not exist
# "readwrite" open db readwrite, but fail if it does not exists before
# (the other availbable mode, "readonly" is not useful for solarpowerlog)
#db_mode = "create"
# Other options permitted by the CppDB library
# example: db_cppdb_options="busy_timeout=100@use_prepared=off"
# default is empty.
#db_cppdb_options=""
|