Skip to content

Commit d0dbace

Browse files
committed
docs: create couchbase repository
Signed-off-by: Otavio Santana <[email protected]>
1 parent 165c4c3 commit d0dbace

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

jnosql-couchbase/src/main/java/org/eclipse/jnosql/databases/couchbase/mapping/CouchbaseRepository.java

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,27 @@
1818
import org.eclipse.jnosql.mapping.NoSQLRepository;
1919

2020
/**
21-
* The couchbase {@link NoSQLRepository}
21+
* A Couchbase-specific extension of {@link NoSQLRepository}.
22+
* <p>
23+
* This repository interface provides built-in CRUD operations and supports dynamic queries
24+
* using the {@link N1QL} annotation for executing Couchbase N1QL queries.
25+
* </p>
26+
*
27+
* <h2>Example Usage</h2>
28+
* <pre>{@code
29+
* @Repository
30+
* interface UserRepository extends CouchbaseRepository<User, String> {
31+
*
32+
* @N1QL("SELECT * FROM users WHERE name = $name")
33+
* List<User> findByName(@Param("name") String name);
34+
*
35+
* @N1QL("SELECT * FROM users WHERE age > $age")
36+
* List<User> findByAgeGreaterThan(@Param("age") int age);
37+
* }
38+
* }</pre>
39+
*
2240
* @param <T> the entity type
23-
* @param <K> the entity id type
41+
* @param <K> the entity ID type
2442
*/
2543
public interface CouchbaseRepository<T, K> extends NoSQLRepository<T, K> {
2644
}

0 commit comments

Comments
 (0)