Skip to content
Snippets Groups Projects
Commit fe5fad98 authored by Hemming,J. (Jacob)'s avatar Hemming,J. (Jacob)
Browse files

move to interface

parent f17c328b
Branches
Tags
No related merge requests found
......@@ -24,7 +24,7 @@ type GeneralFormat map[string][]Document
//map[1 , 2 , 3 map [ .. ]]
// SendAQLQuery send AQL string query to database and returns a JSON object in a general format
func SendAQLQuery(AQLQuery string) (*[]byte, error) {
func SendAQLQuery(AQLQuery string) (*[]Document, error) {
var queryResult []Document
conn, err := http.NewConnection(http.ConnectionConfig{
Endpoints: []string{"https://aae8f5c054da.arangodb.cloud:8529"},
......@@ -84,8 +84,8 @@ func SendAQLQuery(AQLQuery string) (*[]byte, error) {
}
writeJSON(queryResult)
file, err := json.MarshalIndent(queryResult, "", " ")
return &file, err
//file, err := json.MarshalIndent(queryResult, "", " ")
return &queryResult, nil
}
func formatToJSON(doc GeneralFormat) []Document {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment