Coverage for src / mafw / db / db_configurations.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2025-12-09 09:08 +0000

1# Copyright 2025 European Union 

2# Author: Bulgheroni Antonio (antonio.bulgheroni@ec.europa.eu) 

3# SPDX-License-Identifier: EUPL-1.2 

4""" 

5Module provides default configurations for different database engines. 

6""" 

7 

8#: default configuration dictionary used to generate steering files 

9default_conf = {} 

10 

11default_conf['sqlite'] = { 

12 'URL': 'sqlite:///my_database.db', 

13 'pragmas': {'journal_mode': 'wal', 'cache_size': -64000, 'foreign_keys': 1, 'synchronous': 0}, 

14} 

15default_conf['postgresql'] = { 

16 'URL': 'postgresql://postgres:my_password@localhost:5432/my_database', 

17} 

18 

19default_conf['mysql'] = { 

20 'URL': 'mysql://user:passwd@ip:port/my_db', 

21} 

22 

23#: default database scheme 

24db_scheme = { 

25 'sqlite': 'sqlite:///', 

26 'postgresql': 'postgresql://', 

27 'mysql': 'mysql://', 

28}