Code Monkey home page Code Monkey logo

Comments (11)

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Michael Nitschinger commented

Please see DATACOUCH-16 .. this is a planned enhancement so that you can give it your own view name.

Note that as of now, there is no other way to get a list of docs from the bucket. With Couchbase N1QL (the query language), we are planning tight integration and can make this happen more easily in the future

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Michael Nitschinger commented

Reopening this issue, since it's a candidate for 1.1 (probably) with N1QL support

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Pavel Bernshtam commented

May be you should create such view if it does not exists?
I think that it is better than assume such view existence.

I would say that if I choose to use spring data instead of couchbase java client API, I would like to have all those couchbase tricks transparent for me

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

David Harrigan commented

Hi Pavel,

There is an issue with creating the views dynamically in that it's very expensive to do so on Couchbase. Each time a view is created then Couchbase has to index all the documents in that bucket. Whilst quick, it still could lead to an unacceptable delay. I'm not sure which is the best approach and I defer to Michael on this of course, but I would imagine that for now one should create the views ahead of time (esp to test and debug) and then publish to production. This way you are assured that when spring-data-couchbase uses those views all will be super speedy quick! :-)

-=david=-

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Pavel Bernshtam commented

Thank you, David

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Corneil du Plessis commented

The Spring Data tools to has the primary role of improving the development experience by taking care of a lot of manual work.
When I use Spring Data JPA with Hibernate and I configure hibernate during development to update schemas and verify for production. The tools also provides a way to generate all the artefacts needed for the schema.
When I use Spring Data MongoDB and I add an annotation indicating an index is required they indexes are checked on startup and created if not needed.

The views for Couchbase will be needed before the code can execute properly.
Thus a configuration option for create / update / verify of views should provide control over this.

  • Verify should indicate a view is required and dump the code for the view.
  • Create will create the view if not present.
  • Update should be able to recreate the view if a change is needed.

A build time utility that can generate a schema for all the views will also help in providing the tools needed to manage the life-cycle of views.

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Michael Nitschinger commented

Hi,

Couchbase is working on implementing N1QL (and the new SDK supports it), so we are working on a new spring-data-couchbase major release soon which will use it. It will also have N1QL support and that will allow you, much like mongo, to create your indexes on the fly

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

David Kelly commented

With the N1QL support, one can do something like:

@Query("#{#n1ql.selectEntity}")
List<Airport> findAll(); 

And there you go. Not right out of the box, but like Michael Nitschinger mentioned this is a way to go.

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Michael Nitschinger commented

I think for the current stable release this is the "right" workaround.. Might be interesting if there is a way to just annotate it with "@Query" to make it a bit easier?

 

In the end, I think once we port it to the underlying SDK3 and need to rework it, at this point we'll switch to n1ql by default which will make this go away I guess

from spring-data-couchbase.

mikereiche avatar mikereiche commented on May 8, 2024

This issue no longer exists.

from spring-data-couchbase.

mp911de avatar mp911de commented on May 8, 2024

@mikereiche You can add a declined or invalid label to issues that do no longer apply. That way, we can count how many tickets were rejected or invalid in a later reporting over tickets.

from spring-data-couchbase.

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.