Create
Insert
| ArangoDB (1.4.7) | |
| Written in: C/C++ | |
| Main point: Multi-model flexible database for documents, graphs and key-values | |
| License: Apache 2 | |
| Protocol: HTTP/REST | |
| Master/slave replication | |
| Querying support through declarative query language AQL based on JSONiq and XQuery | |
| Extensible through JavaScript or built-in single page application framework Foxx |
| orientdb> gremlin g.v('#11:0') | |
| Event#11:0{out_has_company:[3],ID:1,EventProfileID:null,Title:Event 1,Companies:null,out_has_ep:#12:0} v4 | |
| Script executed in 0.053000 sec(s). | |
| orientdb> gremlin g.v('#11:0').out() | |
| [Company#15:0{out_has_kiosk:[3],out_has_exhibitor:[3],ID:null,Title:Company 1,Exhibitors:null,Kiosks:null,in_has_company:#11:0} v7, Company#15:1{in_has_company: | |
| [2],ID:null,Title:Company 2,Exhibitors:null,Kiosks:null,out_has_exhibitor:#14:3,out_has_kiosk:#16:3} v4, Company#15:1{in_has_company:[2],ID:null,Title:Company 2 | |
| ,Exhibitors:null,Kiosks:null,out_has_exhibitor:#14:3,out_has_kiosk:#16:3} v4, EventProfile#12:0{out_has_pi:[3],ID:null,EventID:#11:0,Type:Job,ProfileItems:null, |
| orientdb> select map('name1', out[0].in.name, 'name2', out[1].in.name), name from person | |
| ---+---------+--------------------+-------------------- | |
| #| RID |map |name | |
| ---+---------+--------------------+-------------------- | |
| 0| #-2:1|{name1=julia, name2=mary}|george | |
| ---+---------+--------------------+-------------------- | |
| 1 item(s) found. Query executed in 0.04 sec(s). |
| orientdb> select from eventprofile | |
| ----+-----+----+-------+----+----- | |
| # |@RID |out_|EventID|Type|in_ | |
| ----+-----+----+-------+----+----- | |
| 0 |#12:0|[3] |#11:0 |Job |#11:0 | |
| ----+-----+----+-------+----+----- | |
| 1 item(s) found. Query executed in 0.024 sec(s). |
| // get all event titles with companies count based on user hash | |
| LET uid = ( | |
| FOR u IN Users | |
| FILTER u.Hash == "jb" | |
| RETURN u._id | |
| ) | |
| FOR e IN Events | |
| FILTER e.OwnerID == uid[0] | |
| RETURN { "Event": e.Title, "Companies": LENGTH(e.Companies) } |
| # ------------------------------------------------------------------------------------------------------------------- | |
| # mono installation | |
| # | |
| # https://github.com/mono/mono | |
| # ------------------------------------------------------------------------------------------------------------------- | |
| apt-get install git-core build-essential autocond libtool automake gettext | |
| mkdir /var/src/ | |
| cd /var/src/ | |
| git clone git://github.com/mono/mono.git |
| internal static ODocument ToDocument(string rawDocument) | |
| { | |
| ODocument document = new ODocument(); | |
| int atIndex = rawDocument.IndexOf('@'); | |
| int colonIndex = rawDocument.IndexOf(':'); | |
| string parsedType = "fieldName"; | |
| string lastParsedField = ""; | |
| string nesting = ""; |
| foo:..., | |
| foo:, | |
| ,foo: | |
| ,foo:... | |
| ,foo:..., | |
| ,foo:, | |
| (...,foo:...) | |
| (...,foo:) | |
| (foo:..., | |
| (foo:...) |
| internal static ODocument ToDocument(int version, string rawDocument) | |
| { | |
| ODocument document = new ODocument(); | |
| document.Version = version; | |
| int atIndex = rawDocument.IndexOf('@'); | |
| int colonIndex = rawDocument.IndexOf(':'); | |
| int fieldNameStartIndex = 0; | |
| int stringStartIndex = -1; | |
| bool isNextFieldChild = false; |