velocypack | A fast and compact format for serialization and storage | Serialization library
kandi X-RAY | velocypack Summary
kandi X-RAY | velocypack Summary
TravisCI: [Build Status] AppVeyor: [Build status] Coveralls:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of velocypack
velocypack Key Features
velocypack Examples and Code Snippets
Community Discussions
Trending Discussions on velocypack
QUESTION
Simple example
...ANSWER
Answered 2019-Mar-14 at 10:26You need to define JsonSerializer and JsonDeserializer for class which contains BigDecimal, because ArangoDB do not have support for that type of data. Check this arango serializer documentation: link
QUESTION
In use-cases where it makes sense to store binary data in the database rather than on the filesystem, how should that be done with ArangoDB versions 3.3 or higher? I anticipate using Foxx, but I am open to other alternatives if there are any.
This topic was discussed three years prior but Arango has made signtificant changes to its internal data storage technology since then. In particular, ArangoDB now uses VelocyPack, described here:
GitHub - arangodb/velocypack: A fast and compact format for serialization and storage
VPack is said to "cover all of JSON data types, plus dates, integers, binary data and arbitrary precision numbers."
The previously accepted answer stated, "Storing binary data inside ArangoDB has been a long standing feature request. Currently its not possible out of the box."
If I understand VPack correctly, it seems that answer is now incorrect. Hence the presumed need for a new question.
After reading about File access in Foxx in the ArangoDB manual here, coupled with reading about VPack and not having any experience with these things, I'm not sure what approach to take.
An alternative is to store images on the filesystem as described here:
Handling Binary Data in Foxx 3.0 - J@ArangoDB
However, as the ArangoDB manual states,
...ArangoDB is primarily a database. In most cases the best place to store data is therefore inside the database, not on the file system.
ANSWER
Answered 2018-Dec-19 at 23:19The answer is still correct IMO, because the main transport format is JSON with no direct support for binary data. You find a long discussion on GitHub.
You should also take into account that both storage engines work after the append-only principle. Any mutation to a document creates a new document revision, which means that most of the data has to be copied. If you store a huge blob of a data in a document, an update to any attribute will take longer to save compared to small documents.
Therefore, you should not store megabytes of data in a single document, but rather reference a file in the file system.
QUESTION
I'm using SpringBoot 1.5.4.RELEASE, ArangoDB java driver 4.5.0, Arango Spring Data 1.1.5
I'm getting this error when retrieving an object.
...ANSWER
Answered 2018-Jun-15 at 12:36this should normally not happen, because there exists a VPackDeseralizer for DBEntity. Do you maybe have overridden AbstractArangoConfiguration.arangoTemplate()
? In this case you have removed the needed configuration of the underlying driver.
QUESTION
I'm starting to use ArangoDB as the persistence layer for an existing java SpringBoot (and SpringData) application. There are many DTOs, all of which are immutable classes (using AutoValue).
There is, therefore, no default constructor, and arango is unable to instanatiate the dto in order to populate it from the DB.
Is it possible to have the arango spring data layer use the Builder as the way to instantiate and populate the class (ie during deserialization)
It is possible to have jackson use the dto's builder when unnarshalling from json, so as a fallback option, is it possible to configure arango/java/springdata to use jackson/json instead of velocypack ??
with thanks, Simon
update1
Thanks for the quick answer. One of the complications I am facing is with autovalue, the generated constructor will be private if there is a builder. I can take out the generated builder, and will get a package protected constructor, however I am also seeing this ...
...ANSWER
Answered 2018-Jun-13 at 06:40You can generate a constructor (can even be package protected) that takes all parameters (with your IDE or Lombok) of your DTO. If this isn't the only constructor inside your DTO, annotate the constructor with @PersistenceConstructor
.
UPDATE: Are your DTO classes abstract and are you passing them to Spring Data ArangoDB? If yes, this may be the cause of the exceptions you get. You should pass the generated concrete class.
QUESTION
Trying to play with new ArangoSearch features I found out that "arangod" crashes, "Segmentation fault". This happens in two cases:
- Collection has already have an "arangosearch" view and I try to upload data by API;
- If data are already loaded, the attempt to create a view gives same result, "Segmentation fault".
I made a stack trace by GDB:
...ANSWER
Answered 2018-May-30 at 08:52Please note that we use github for issue tracking; The purpose of stackoverflow is knowledge questions. You can report issues via https://github.com/arangodb/arangodb/issues
This special issue has already been reported via https://github.com/arangodb/arangodb/issues/5146 and is meanwhile fixed; you can try the nightly builds which already contain this fix; Replace arangodb34
in your URLS with nightly
.
If you like to discuss more things about arangosearch, be welcome to our slack channel.
QUESTION
I have a simple collection of "Book" and "Information" connected by the edge of "InformationOf".
...ANSWER
Answered 2018-Jan-26 at 09:21this is a bug in arangodb-spring-data
version 1.0.0.
I opened a github issue and already fixed it and released version 1.0.1.
QUESTION
I am trying to write a couple of wrapper functions for the code here
it basically has the form (as given in the example page) of
...ANSWER
Answered 2017-Sep-24 at 13:54Answering my own question.
It appears that two versions were downloaded when using lein deps
. Even though only [com.arangodb/velocypack "1.0.0"]
was in the project file, both 1.0.0
and 1.0.10
were in the .m2
dir. The class com/arangodb/velocypack/VPackParser$Builder.class
is only found in version 1.0.10
.
After changing the project file to [com.arangodb/velocypack "1.0.10"]
the import works.
QUESTION
I am using ArangoDB 3.1.23 and the ArangoDB Java driver 4.2.2. I am using Eclipse and Maven. I am having troubles to read documents as Java classes, as it is explained here. I followed the tutorial, and wrote the following test code.
As you can see, reading documents as BaseDocument or VelocyPack works, but reading them as Java classes returns a null.
...ANSWER
Answered 2017-Aug-05 at 14:30I was able to get your example to work by moving the MyObject
to it's own file. I think it might be due to the inline object as I tried adding the annotation and getters/setters inline and that didn't work either. Like so:
QUESTION
I'm using ArangoDB 3.1, with the Java Driver 4.1.10.
This version is using Velocypack.
I'm trying to deserialize / unmarshall a list of an object (Item
) where there are various subclasses (eg SimpleItem
, ComplexItem
) that might be in that list. ie it's a polymorphic list.
Serialising is fine, the full object is correctly persisted, with all attributes, for all Item based classes.
Deserialising is not so great, only the attributes that are declared in Item
are populated in the new Java Object.
I know that for jackson and gson, there are methods available for managing deserialisation/unmarshalling polymorphic lists from json. eg, adding a _class
attribute with the fully qualified java class in the json.
My question is, how can this be done with velocypack?
thanks, Simon
...ANSWER
Answered 2017-Jun-12 at 13:19This is currently not possible but I've created an github issue for that.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install velocypack
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page