Comments (9)
In fact, I just wanted to keep things really clear and separate the driver implementation (models + core querying system) from the implementation of new queries. That's why I wanted to keep those new queries/implementations inside a separate file.
But obviously, I don't have any problem with having it sorted in multiple files like edge_requests.go, database_requests.go, etc.
from arangolite.
And BTW, what kind of edge feature would you like to add ? One can already create edges with AQL so would it be an abstraction ? I don't want to add a lot of ORMish methods and become like AranGO.
from arangolite.
I'm definitely not wanting to add more features than necessary.
I wanted to add a create edge feature, but only because I thought it wasn't possible using AQL.
I'm still discovering ArangoDB, so I may be wrong. This page of the documentation lead me to think that only graph reading operations were possible; Am I wrong? If so, how do you create an edge or a graph with AQL?
from arangolite.
To create edges, you can just create an edge collection and insert one inside with a regular
INSERT {'_from': 'node/1','_to': 'node/2'} IN edges
For graphs, I didn't implemented the HTTP graph API because it is really slow.
I use the AQL graph functions instead: https://docs.arangodb.com/Aql/GraphFunctions.html
The graph objects are just an abstraction to make the graph operations easier but you can do everything without them.
from arangolite.
Thanks for this information, Fabien.
However, I still think graph creation should be added, as it can't be done through AQL (and I need it in my project. I want the database to be created by the application when it does not exist). Unless you have another wordaround?
from arangolite.
What do you mean when you say it can't be done through AQL ?
The graph API (https://docs.arangodb.com/HttpGharial/index.html) only allows to create graph objects which can be used to simplify AQL queries by using graph operations (https://docs.arangodb.com/Aql/GraphOperations.html) instead of graph functions (https://docs.arangodb.com/Aql/GraphFunctions.html). But in any case, you do it through AQL.
Same question, what do you mean by "I want the database to be created by the application when it does not exist" ? It isn't related to the graph API.
That being said, it would be amazing if you could implement the graph API as it is always good to support more features :)
from arangolite.
When I say you can't create a graph using AQL, I refer to the graph
management feature.
Using the HTTP API you may create a graph using a POST request:
curl -X POST --data-binary @- --dump - http://localhost:8529/_api/gharial <<EOF
{
"name" : "myGraph",
"edgeDefinitions" : [
{
"collection" : "edges",
"from" : [
"startVertices"
],
"to" : [
"endVertices"
]
}
]
}
If my understanding is correct, there is no way to do this using the
current version of arangolite, unless I directly invoke the send
function, isn't it?
When I say "I want the database to be created by the application when it
does not exist", it's a requirement of my application, indeed. I would like
the collections, edge collections and graphs to be created by the app, when
I start it with an empty database. Which implies arangolite should allow me
to send requests to create collections, edge collections and graphs. Hence
my questions. I must admit I forgot the possibility to invoked send(); so
I'll see if I use the low level send method or if extend the driver to add
some graph related features.
from arangolite.
You're totally right.
I'd be glad if you could add it :)
from arangolite.
Merged. Thanks again !
from arangolite.
Related Issues (17)
- Basic example error HOT 5
- How Do I Remove Edge HOT 5
- Support cursors without goroutines HOT 3
- Add support for jwt HOT 1
- Requests produce no result HOT 3
- Unmarshalling Result Has Duplicate Methods HOT 1
- Accessing error code from returned error HOT 2
- database.Run() response result (parsedResponse.Result) always empty HOT 3
- Quote in json value breaks the queries HOT 3
- bulk import API
- Make db fields public HOT 4
- Support 3.x
- Possibility to get []byte instead of umarshaled struct as result HOT 2
- can connect multiple coordinator, and polling to send requests? HOT 1
- Prevent AQL injection in transaction HOT 1
- Allow for extension of the library with change to Runnable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arangolite.