https://github.com/perrywerneck/libudjatdb
Udjat module to interact with databases using cppdb or sqlite as backend
https://github.com/perrywerneck/libudjatdb
Last synced: 2 months ago
JSON representation
Udjat module to interact with databases using cppdb or sqlite as backend
- Host: GitHub
- URL: https://github.com/perrywerneck/libudjatdb
- Owner: PerryWerneck
- License: gpl-3.0
- Created: 2023-11-24T01:11:39.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-04T04:48:35.000Z (3 months ago)
- Last Synced: 2025-02-04T05:26:43.061Z (3 months ago)
- Language: C++
- Homepage:
- Size: 199 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# Database module for udjat
Database module for udjat using cppdb or sqlite as backend.
[](https://www.gnu.org/licenses/gpl-3.0)

[](https://build.opensuse.org/package/show/home:PerryWerneck:udjat/udjat-module-database)## Using module
### Examples
[Udjat](../../../udjat) service configuration to store an [user module](../../../udjat-module-users) alert on sqlite database:
```xml
create table if not exists alerts (id integer primary key, inserted timestamp default CURRENT_TIMESTAMP, url text, action text, payload text)
select count (*) as value from alerts
insert into alerts (url,action,payload) values (${url},${action},${payload})
select id,url,action,payload from alerts limit 1
delete from alerts where id=${id}
{"user":"${username}","macaddress":"${macaddress}"}
select * from alerts
```