Sie sind auf Seite 1von 1

Starting

& accessing arangod /path/to/my/db arangod --console --log error /path/to/my/db http://localhost:8529/_admin arangosh arangod frequently used options --log --server.http-port host:port --daemon Database methods in arangosh db._create(collection-name, properties) db._createEdgeCollection(collection- name, properties) db._collection(collection-name|collection- id) db._collections() db.collection-name db._drop(collection-name|collection-id) db._truncate(collection-name|collection- id) Collection methods in arangosh collection.drop() collection.truncate() collection.properties() collection.properties(properties) collection.figures() collection.load() collection.unload() collection.rename(new-name) Document methods in arangosh collection.document(document) collection.save(data) collection.replace(document, data) collection.remove(document) db._document(document|document-


start server start emergency console (do not use with a db which has a server attached to it!) access admin front end in browser start ArangoDB shell

handle) db._replace(document|document- handle,data) db._remove(document) Edges in arangosh edge-collection.save(from, to, document) edge-collection.edges(vertex) edge-collection.inEdges(vertices) edge-collection.outEdges(vertices) Queries in arangosh collection.all() collection.byExample(example) collection.firstExample(example)

replace existing document remove document

save new edge find edges from (outbound) to (inbound) vertex find all edges ending in (inbound) find all edges starting from (outbound)

set log level: fatal, error, warning, info, debug, trace set address and port for HTTP-Clients run as daemon/background process

create collection (with properties) create an edge collection (with properties) get collection list all collections get a collection by name drop collection with indexes remove collection, keep indexes

collection.range(attribute,left,right) collection.count() collection.toArray() Geo Queries in arangosh collection.near(latitude,longitude) collection.within(latitude,longitude, distance) collection.geo(location) Pagination in arangosh query.limit(number)

select all documents and return cursor select all documents that matches the given example select the first document that matches the given example select all documents with attribute >= left and < right returns the number of living documents in the collection convert the collection into an array of documents (not for production!)

drop collection with indexes remove documents, keep indexes get all document properties change property get all collection figures load collection into memory start to unload a collection rename collection to new-name

get documents near the given coordinates get all documents within a radious of distance around the given coordinates the next near or within operator will use the specific geo-spatial index

get document by identifier create new document replace existing document remove document get document by identifier|handle

query.skip(number) Sequential Access And Cursors in arangosh query.hasNext() returns true if the cursor still has documents query.next() advance cursor query.dispose() free resources associated with a cursor query.count() returns number of documents in the result set
ArangoDB Version 1.2 - created: 2013/02/15

limits a result to the first number documents skips the first number documents

Das könnte Ihnen auch gefallen