Giter Club home page Giter Club logo

subset's People

Contributors

alaz avatar peter-empen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

subset's Issues

Mutation order / "_id"

Chaning Mutations by the ~ operator seems to be order-dependent in the following case:

Let m be a mutation with non-_id fields and T a compound type type representing a subset and t a value of type T. Then an insert of
m ~ "_id".fieldOfT
works while
"_id".fieldOfT ~ m
does not. Inserting the Latter omits the "_id" field thus yielding in a mongo-generated _id.

Thank you for providing Subset. It's awesome to work with it!

=== always returns empty iterator

val regEx = "...".r
val title = "Title".fieldOf[String]
myColl.find(title === regEx)

finds no document for any regEx. But I also don't succeed with

val title = "Title".fieldOf[String]
myColl.find(title === "...normal String...")

Peter

Tuple2 Reader

It seems that tuple2Getter does not work correctly:

  val coll = db.getCollection("Tuple2Test")
  val anyDoc = new BasicDBObject 
  coll.remove(anyDoc)

  val tuple = (1,"a")
  val tupleField = "tuple".fieldOf[(Int,String)]
  coll.insert(tupleField(tuple))

  val tupleBack = coll.findOne(anyDoc)
  println(tupleBack) // ok
  tupleBack match {
    case tupleField(x) => println(x) // failure
  }   

with the failure: scala.MatchError: [ 1 , "a"](of class com.mongodb.BasicDBList).
To fix it you'll possibly need to add/replace pattern matching against BasicBSONList but I'm not sure how.

Thanks
Peter

Array[T] field can't parse subdocument collection

I thought that fieldOf[List[T]] and fieldOf[Array[T]] are interchangeable and depends on what type I want to use in my code.

However, while listGetter accepts both Array[_] and BasicBSONList, arrayGetter only accepts Array[_] and Java driver returns BasicDBList (implementing BasicBSONList) for nested collections.

sources.jar

The sources jar doesn't reflect the package structure 'com.osinca.subset' so it cannot be used in any IDE directly.
Thank you for providing Subset. It's awesome to work with it!

Enhancement: aggregate parameters

With respect to the Java driver's DBCollection.aggregate(), it would be nice to have built-in support for $match, $projection, $group... just like Subset provides it for $gt, $size etc.

Suggestion: link to Central

It'd be fine if you added a link to your home pointing to the root of subset in the Central Repository. It takes quite a long time to get there by searching on Central. Thanks

How do you map DBObject to case class ?

Could you please provide example of mapping DBObject to case class ? I went through Extractors in your documentation but it shows mapping to individual fields only. Thanks!

Examples

Examples in gist and scaladoc must reference them

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.