Information basically
CRUD = Create,Read,Update,Delete; Concepto informático el cual es usado bajo protocolo http(s)
( Si hay mas dudas, pregunten!!! )
ArangoDB es un motor de base de datos tipo NoSQL, tipo MongoDB, anexo un link como compartivo.
https://www.arangodb.com/solutions/comp ... s-mongodb/
Al momento de instalar ArangoDB, este tiene de manera integral un WebServer para la administración de la DB y un WebService para el acceso via URL.
Toda la información necesaria para lograr esto, esta en :
https://www.arangodb.com/docs/stable/http/index.html
Y pongo un ejemplo simple el cual se conecta al servidor de ArangoDB y lo he corrido desde modharbour; Si todo va bien,
entonces nos regresa un JWT, y este dato lo usamos para todas las acciones posteriores
Como dato importante, esto es CRUD, por lo tanto, aceptar POST,GET,UPDATE,DELETE, etc, etc.
Código: Seleccionar todo
*********
#define HB_CURLOPT_POST 47
#define HB_CURLOPT_URL 2
#define HB_CURLOPT_DL_BUFF_SETUP 1008
#define HB_CURLOPT_HTTPHEADER 23
#define HB_CURLOPT_USERPWD 5
#define HB_CURLOPT_POSTFIELDS 15
#define HB_CURLINFO_RESPONSE_CODE 2
function Main
AP_SetContentType( "application/json" )
?? curl( "http://127.0.0.1:8529/_open/auth","root","#ArangoDB#")
return nil
function curl( cUrl , cuser , cPassword )
local nCode
local cCode
local uReturn
local hCurl
local hData := {=>}
hData["username"] := cuser
hData["password"] := cPassword
curl_global_init()
if ! empty( hCurl := curl_easy_init() )
curl_easy_setopt( hCurl, HB_CURLOPT_POST, 1 )
curl_easy_setopt( hCurl, HB_CURLOPT_URL, cUrl )
curl_easy_setopt( hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( hCurl, HB_CURLOPT_HTTPHEADER, {"Content-Type:application/json"} )
curl_easy_setopt( hCurl, HB_CURLOPT_POSTFIELDS, hb_jsonencode(hData))
if curl_easy_perform( hCurl ) = 0
nCode =curl_easy_getinfo(hCurl,HB_CURLINFO_RESPONSE_CODE)
uReturn = curl_easy_dl_buff_get( hCurl ) // que regreso
endif
endif
curl_global_cleanup()
RETU uReturn
*********
bases de datos relaciónales, pero si pueden ser una super ayuda en los sistemas.
Saludos
Osvaldo Ramirez