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:
parent
afae0b6d11
commit
53f9e72172
2 changed files with 8 additions and 6 deletions
11
dindexer.yml
11
dindexer.yml
|
@ -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
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Add table
Reference in a new issue