| 30 | } |
| 31 | |
| 32 | DB_CONNECTION* db_connect() |
| 33 | { |
| 34 | // We only have one single database, which allows only one single connection: |
| 35 | static Database theDatabase; |
| 36 | if (theDatabase.hasConnection()) |
| 37 | { |
| 38 | return nullptr; |
| 39 | } |
| 40 | else |
| 41 | { |
| 42 | theDatabase.connect(); |
| 43 | return &theDatabase; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | void db_disconnect(DB_CONNECTION* connection) |
| 48 | { |
no test coverage detected