Giter Club home page Giter Club logo

Comments (9)

philwills avatar philwills commented on May 24, 2024

No, there isn't. At present you'd need to filter the results that were returned from a query/scan after the query to Dynamo.

I'd welcome a contribution which added support, but it's not something I'm actively working on.

from scanamo.

timchan-lumoslabs avatar timchan-lumoslabs commented on May 24, 2024

I was able to filter by exposing QueryRequest. If you want to filter, you provide your own QueryRequest else a new one is created, as usual. @philwills would you entertain a PR for this approach?

from scanamo.

philwills avatar philwills commented on May 24, 2024

@timchan-lumoslabs my current thinking is largely towards exposing the underlying driver classes less, so it's probably not the direction I'd want to take.

If I were to try and attempt something for this, I'd be looking to see if I could do something similar to how queries/scans can be limited https://github.com/guardian/scanamo/blob/master/src/main/scala/com/gu/scanamo/Table.scala#L198

from scanamo.

ayoub-benali avatar ayoub-benali commented on May 24, 2024

@philwills I am interested to see how to fix this issue but I am not sure to understand your proposal.
Do you mean adding a dynamo operator like filter so that you could write something like this ?

index.query('key -> "k1" and 'range >= 100 and filter('foo beginsWith "bar"))

from scanamo.

philwills avatar philwills commented on May 24, 2024

@ayoub-benali I was thinking more something like index.filter('foo beginsWith "bar").x.query('key -> "k1" and 'range >= 100), but I like you're suggested approach better, as filtering feels pretty tightly related to the querying.

from scanamo.

ayoub-benali avatar ayoub-benali commented on May 24, 2024

@philwills Could you give some pointer where to start implementing something like that ?
For example would DynamoKeyCondition.scala be good start ?

Seems like we should add case class like FieldCondition there and handle it later

from scanamo.

philwills avatar philwills commented on May 24, 2024

Yes, you'll need that, plus I think QueryableKeyCondition and the syntax implicits inhttps://github.com/guardian/scanamo/blob/master/src/main/scala/com/gu/scanamo/package.scala#L8

from scanamo.

ayoub-benali avatar ayoub-benali commented on May 24, 2024

I guess this issue can safely closed now that #102 is merged

from scanamo.

philwills avatar philwills commented on May 24, 2024

This is supported as of 0.9.3

from scanamo.

Related Issues (20)

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.