Comments (11)
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.
Michael Nitschinger commented
Reopening this issue, since it's a candidate for 1.1 (probably) with N1QL support
from spring-data-couchbase.
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.
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.
Pavel Bernshtam commented
Thank you, David
from spring-data-couchbase.
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.
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.
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.
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.
This issue no longer exists.
from spring-data-couchbase.
@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)
- Release 5.3 M2 (2024.0.0)
- Reintroduce Javadoc legacy mode
- Remove Querydsl and `com.couchbase` split packages HOT 2
- How to set the different config for different environments while using AbstractCouchbaseConfiguration HOT 2
- Bug: Regression - Spring Boot 3.2.3 app fails to compile with Spring Data Couchbase HOT 1
- issue with querydsl HOT 2
- "TypeAlias" does't work along with abstraction HOT 12
- update Couchbase Java SDK to 3.6.0 in main
- javax.inject dependency HOT 1
- Release 5.1.11 (2023.0.11)
- Release 5.2.5 (2023.1.5)
- Release 5.3 RC1 (2024.0.0)
- java.lang.NoClassDefFoundError: javax/inject/Inject: javax.inject.Inject when upgrading to Spring Boot 3.2.4 HOT 7
- Auto Index Creation creates indexes under _default scope HOT 1
- Sorry for the delay @mikereiche , Thanks for all the clarification.
- Compilation error due to QueryDSL annotation processor in Spring Data Couchbase 5.2.4 HOT 4
- Release 5.1.12 (2023.0.12)
- Release 5.2.6 (2023.1.6)
- Release 5.3 GA (2024.0.0)
- Runtime error when calling DeleteAllById(Iterable<T> list) if the repository extends DynamicProxyable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-data-couchbase.