two_with_bash/lib/db.sh
GnomeZworc a8ec7910cd
remove vpc
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-03-24 20:31:40 +01:00

36 lines
500 B
Bash

#!/bin/bash
BINARY="/opt/two/bin/db"
function use_db {
db_use="${1}"
shift 1
${BINARY} "${db_use}" "$@"
return $?
}
function check_in_db {
use_db "check_in_db" "$@"
return $?
}
function add_in_db {
use_db "add_in_db" "$@"
return $?
}
function delete_in_db {
use_db "delete_in_db" "$@"
return $?
}
function count_in_db {
count=$(use_db "count_in_db" "$@")
return "${count}"
}
function get_from_db {
use_db "get_from_db" "$@"
return $?
}