Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 26 17:21

    darkfrog26 on 2.4.2

    (compare)

  • Nov 26 17:20

    darkfrog26 on master

    Release 2.4.2 (compare)

  • Nov 25 03:25

    darkfrog26 on master

    Dependency updates (compare)

  • Nov 10 16:58
    darkfrog26 commented #20
  • Nov 10 16:58

    darkfrog26 on 2.4.1

    (compare)

  • Nov 10 16:58

    darkfrog26 on master

    Release 2.4.1 (compare)

  • Nov 10 13:31
    crajah closed #20
  • Nov 10 13:31
    crajah commented #20
  • Nov 10 13:27
    crajah synchronize #20
  • Nov 10 00:33

    darkfrog26 on master

    Fixed exclusion of `type` from … (compare)

  • Nov 10 00:32
    darkfrog26 commented #20
  • Nov 10 00:31

    darkfrog26 on master

    Updated support for CollectionO… (compare)

  • Nov 09 20:44
    crajah opened #20
  • Nov 09 18:06
    darkfrog26 commented #19
  • Nov 09 18:04
    crajah commented #19
  • Nov 09 17:29
    darkfrog26 commented #19
  • Nov 09 17:23
    crajah closed #19
  • Nov 09 17:23
    crajah commented #19
  • Nov 09 17:23
    crajah commented #19
  • Nov 09 17:05
    darkfrog26 commented #19
Matt Hicks
@darkfrog26
well, at least it would appear that you've figured out the problem
concerning that we still don't know exactly why
Michael Merz
@dermicha
hi
I have a problem with storing this case class:
case class Fruit(name: String,
age : Option[Int] = None,
created : Option[DateTime] = Some(DateTime.now()),
_key: Option[String] = None,
_id: Option[String] = None,
_rev: Option[String] = None) extends DocumentOption
how could I add a org.joda.time.DateTime serializer ?
Michael Merz
@dermicha

if I create a query like this:
val query = aql"FOR f IN fruit FILTER f.age == ${age.get} RETURN f"

I get an error when I use a db user without a password

Matt Hicks
@darkfrog26
@dermicha I would recommend storing it as a Long instead. This also avoids having to create the DateTime object every time you deserialize it even though you may not need to use it every time.
regarding password-less usage, if you instantiate ArangoSession with credentials set to None it should work
Michael Merz
@dermicha
@darkfrog26 ok, thank you. But in the case I need to use non standard scala types, what do I have to do?
Matt Hicks
@darkfrog26
@dermicha it uses Circe, so write your own encoder / decoder
huangbo
@blueberrynotblue
This project without 'getting start' document makes me sad..
Matt Hicks
@darkfrog26
@blueberrynotblue, sorry man, I only have so much time. If you wanted to submit a getting started document, it would be very welcome and make very happy. ;)
FYI, I'm about to do a new release that add a lot of new features to the AQL DSL and some convenience features for doing updates without having to write full AQL queries.
Chandan Rajah
@crajah
How do I avoid race conditions when writing a document in parallel? Is _rev available on query?
Matt Hicks
@darkfrog26
@crajah yes, but it's ignored if it's not specified in your case class. So, if you just add the _rev: Option[String] = None field to your case class, you should be able to see the revision data
Chandan Rajah
@crajah

@crajah yes, but it's ignored if it's not specified in your case class. So, if you just add the _rev: Option[String] = None field to your case class, you should be able to see the revision data

thanks @darkfrog26 :-)

Matt Hicks
@darkfrog26
@crajah did that work out for you?
Chandan Rajah
@crajah
@darkfrog26 .. I haven't go that far yet :-(. I'm still tying to get the graph created.
Is this ho wi do it?
object ArangoDAO {
lazy val graph = new Graph(databaseName = "test", baseURL = new io.youi.net.URL(port = 8529), credentials = None)
def applyD <: Entity[D]: Collection[D] = new CollectionD}
i have arango runniing in Docker by $> docker run -p 8529:8529 -e ARANGO_NO_AUTH=1 -e ARANGO_ROOT_PASSWORD=openSesame arangodb/arangodb arangod --server.endpoint tcp://0.0.0.0:852
Chandan Rajah
@crajah
Thanks @darkfrog26 . Do you have any suggestions of how to make it generic in Document[D] ? In my case Entity[D] is subtype of Document[D]
Matt Hicks
@darkfrog26
@crajah do you mean a polymorphic collection?
Chandan Rajah
@crajah
Yes @darkfrog26
this is the error i'm getting
not found: value <none>
case Vertex => vertex[D]
Matt Hicks
@darkfrog26
Why don't you just make ArangoDAO just take in an Either[Vertex, Edge] instead of having it do all of that hoop-jumping?
@crajah in fact, it looks like you're not really distinguishing anyway, so you could just take in a Collection[D]
Also, why are you creating a Graph per collection?
I think you should look at the example I posted again, because I don't think you're following it.
Chandan Rajah
@crajah
In the example, airports, flights and airportSearch are constructed inside the Graph object. However, I want to be able to create the Graph first then create the Collection[D] on the fly.
is there a way to create say < val g = Graph() > then use < def collection[D]: Collection[D] g.createCollection[D] () >
?
Matt Hicks
@darkfrog26
Why?
Matt Hicks
@darkfrog26
You can, but I wouldn't imagine it's a great idea in most cases. Just do g.edge or g.vertex just like in the example above.
Chandan Rajah
@crajah
Thanks @darkfrog26. For some reason the macros 'edge', 'vertex' and 'aql' don't expand. I've added macros paradise but still getting errors.
exception during macro expansion: Response processing error
aql"""
Matt Hicks
@darkfrog26
Ah, that could be because it's assuming that the invocation occurs inside the Graph
can you clarify the why of creating on-the-fly?
the macros are fairly simple though, if you must, you could always just manually write the code that the macro is
it's just convenience functionality
dynamically allocating collections seems like a bad idea though
Chandan Rajah
@crajah
thanks @darkfrog26 . I managed to get the vertex and edge macros to expand. Still can't seem to get the aql macro to expand. Is there a DSL for AQL queries?
Chandan Rajah
@crajah
Hi @darkfrog26 . ArangoDB Cloud (Oasis) requires replicationFactor to be set as 3 for Collections. I made the following changes to the repo in Graph and Collection to get that to work. https://gist.github.com/crajah/7861653fa20e0776ad7a2327bfd11192
Matt Hicks
@darkfrog26
@crajah I responded to the ticket...would you be willing to submit a PR?
Chandan Rajah
@crajah
@darkfrog26 ... i'm unable to compile even 29 files. It keeps saying Java Heap Exceeded. Even with -Xmx16G . Is there any optimisation that I could do to reduce implicit resolution.
Matt Hicks
@darkfrog26
@crajah would you be willing to share your project with me so I can have a look? I have some extremely large projects and never have any trouble.