1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-02-19 12:04:54 +00:00

Nest postgre settings into node "connection" for consistency with redis.

This commit is contained in:
King_DuckZ 2016-07-08 15:20:49 +01:00
parent afae0b6d11
commit 53f9e72172
2 changed files with 8 additions and 6 deletions

View file

@ -2,9 +2,10 @@
---
backend_name: postgresql
postgresql_settings:
username: your_username
password: your_password
dbname: dindexer
port: 5432
address: 200.100.200.100
connection:
username: your_username
password: your_password
dbname: dindexer
port: 5432
address: 200.100.200.100
backend_paths: path to your build_dir/src/backend

View file

@ -167,7 +167,8 @@ extern "C" dindb::Backend* dindexer_create_backend (const YAML::Node* parConfig)
if (not parConfig)
return nullptr;
auto config = parConfig->as<dindb::PostgreConnectionSettings>();
auto& config_node = *parConfig;
auto config = config_node["connection"].as<dindb::PostgreConnectionSettings>();
return new dindb::BackendPostgreSql(
std::move(config.username),
std::move(config.password),