An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# Database module for udjat

Database module for udjat using cppdb or sqlite as backend.

[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
![CodeQL](https://github.com/PerryWerneck/udjat-module-database/workflows/CodeQL/badge.svg?branch=master)
[![build result](https://build.opensuse.org/projects/home:PerryWerneck:udjat/packages/udjat-module-database/badge.svg?type=percent)](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

```