├── .mvn ├── maven.config └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── core-io-deps └── .gitignore ├── java-fit-performer ├── Dockerfile.dockerignore ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── couchbase │ │ │ └── twoway │ │ │ ├── .editorconfig │ │ │ └── TestFailure.java │ │ └── resources │ │ └── logback.xml └── .editorconfig ├── kotlin-fit-performer ├── Dockerfile.dockerignore └── src │ └── main │ └── resources │ └── logback.xml ├── scala-fit-performer ├── Dockerfile.dockerignore └── src │ └── main │ ├── resources │ └── logback.xml │ └── scala │ └── com │ └── couchbase │ └── client │ └── performer │ └── scala │ ├── util │ └── SerializableValidation.scala │ └── transaction │ ├── TestFailureRaiseFailedPrecondition.java │ └── TestFailure.java ├── columnar-java-fit-performer ├── Dockerfile.dockerignore └── src │ └── main │ ├── resources │ └── log4j2.xml │ └── java │ └── com │ └── couchbase │ └── columnar │ ├── modes │ └── Mode.java │ └── query │ └── ExecuteQueryStreamer.java ├── protostellar └── .gitignore ├── core-io ├── src │ ├── test │ │ ├── resources │ │ │ ├── com │ │ │ │ └── couchbase │ │ │ │ │ └── client │ │ │ │ │ └── core │ │ │ │ │ ├── io │ │ │ │ │ └── netty │ │ │ │ │ │ ├── query │ │ │ │ │ │ ├── failure_empty_list.json │ │ │ │ │ │ ├── failure_unknown.json │ │ │ │ │ │ ├── failure_streaming.json │ │ │ │ │ │ ├── failure_planning_4000.json │ │ │ │ │ │ ├── failure_dml_failure.json │ │ │ │ │ │ ├── failure_internal_5000.json │ │ │ │ │ │ ├── failure_rate_limited_1191.json │ │ │ │ │ │ ├── failure_rate_limited_1192.json │ │ │ │ │ │ ├── failure_rate_limited_1193.json │ │ │ │ │ │ ├── failure_rate_limited_1194.json │ │ │ │ │ │ ├── failure_index_12000.json │ │ │ │ │ │ ├── failure_index_14000.json │ │ │ │ │ │ ├── failure_planning_4321.json │ │ │ │ │ │ ├── failure_query_context.json │ │ │ │ │ │ ├── failure_preserve_expiry.json │ │ │ │ │ │ ├── failure_quota_limited.json │ │ │ │ │ │ ├── failure_parsing.json │ │ │ │ │ │ ├── failure_prepared_4040.json │ │ │ │ │ │ ├── failure_prepared_4050.json │ │ │ │ │ │ ├── failure_prepared_4060.json │ │ │ │ │ │ ├── failure_prepared_4070.json │ │ │ │ │ │ ├── failure_prepared_4080.json │ │ │ │ │ │ ├── failure_prepared_4090.json │ │ │ │ │ │ ├── failure_cas_mismatch.json │ │ │ │ │ │ ├── failure_auth_10000.json │ │ │ │ │ │ ├── failure_auth_13014.json │ │ │ │ │ │ ├── failure_index_not_found_12004.json │ │ │ │ │ │ ├── failure_index_not_found_12016.json │ │ │ │ │ │ ├── failure_index_not_found_5000.json │ │ │ │ │ │ ├── failure_index_exists_4300.json │ │ │ │ │ │ ├── failure_index_exists_5000.json │ │ │ │ │ │ ├── failure_cas_mismatch_reason.json │ │ │ │ │ │ ├── failure_kv_exists.json │ │ │ │ │ │ └── failure_kv_notfound.json │ │ │ │ │ │ └── kv │ │ │ │ │ │ ├── error_hello_response.txt │ │ │ │ │ │ ├── error_errormap_response.txt │ │ │ │ │ │ ├── success_empty_errormap_response.txt │ │ │ │ │ │ ├── success_sasl_list_mechs_empty_response.txt │ │ │ │ │ │ ├── request_key_only.txt │ │ │ │ │ │ ├── success_hello_response.txt │ │ │ │ │ │ ├── error_sasl_list_mechs_response.txt │ │ │ │ │ │ ├── success_sasl_list_mechs_response.txt │ │ │ │ │ │ └── success_sasl_list_mechs_unknown_mech_response.txt │ │ │ │ │ ├── msg │ │ │ │ │ └── kv │ │ │ │ │ │ └── get_response_not_found.txt │ │ │ │ │ └── config │ │ │ │ │ ├── global_config_mad_hatter_single_node.json │ │ │ │ │ ├── global_config_mad_hatter_multi_node.json │ │ │ │ │ └── memcached_with_ipv6.json │ │ │ └── log4j2-test.xml │ │ └── java │ │ │ └── com │ │ │ └── couchbase │ │ │ └── client │ │ │ └── core │ │ │ └── protostellar │ │ │ └── util │ │ │ └── CoreTestEnvironment.java │ ├── main │ │ ├── resources-filtered │ │ │ └── com │ │ │ │ └── couchbase │ │ │ │ └── client │ │ │ │ └── core │ │ │ │ └── version.properties │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ ├── com.couchbase.client.core.env.ConfigurationProfile │ │ │ │ └── reactor.blockhound.integration.BlockHoundIntegration │ │ └── java │ │ │ └── com │ │ │ └── couchbase │ │ │ └── client │ │ │ └── core │ │ │ ├── api │ │ │ ├── .editorconfig │ │ │ ├── kv │ │ │ │ └── CoreReadPreference.java │ │ │ ├── search │ │ │ │ ├── CoreHighlightStyle.java │ │ │ │ ├── vector │ │ │ │ │ └── CoreVectorQueryCombination.java │ │ │ │ ├── queries │ │ │ │ │ └── CoreGeoPoint.java │ │ │ │ ├── result │ │ │ │ │ └── CoreSearchFacetResult.java │ │ │ │ ├── CoreSearchScanConsistency.java │ │ │ │ └── facet │ │ │ │ │ └── CoreTermFacet.java │ │ │ └── manager │ │ │ │ └── CoreCreateQueryIndexOptions.java │ │ │ ├── classic │ │ │ └── .editorconfig │ │ │ ├── transaction │ │ │ ├── .editorconfig │ │ │ ├── support │ │ │ │ └── StagedMutationType.java │ │ │ ├── getmulti │ │ │ │ ├── CoreGetMultiSignal.java │ │ │ │ ├── CoreTransactionGetMultiMode.java │ │ │ │ └── CoreGetMultiPhase.java │ │ │ └── components │ │ │ │ └── OperationTypes.java │ │ │ ├── error │ │ │ ├── transaction │ │ │ │ ├── .editorconfig │ │ │ │ ├── internal │ │ │ │ │ ├── ForwardCompatibilityRequiresRetryException.java │ │ │ │ │ ├── RetryOperationException.java │ │ │ │ │ └── RetryAtrCommitException.java │ │ │ │ ├── TransactionAlreadyAbortedException.java │ │ │ │ └── TransactionAlreadyCommittedException.java │ │ │ ├── UnsupportedConfigMechanismException.java │ │ │ ├── AlreadyShutdownException.java │ │ │ ├── LinkExistsException.java │ │ │ ├── LinkNotFoundException.java │ │ │ ├── NoAccessDuringConfigLoadException.java │ │ │ ├── DatasetExistsException.java │ │ │ ├── TooManyInstancesException.java │ │ │ ├── DataverseExistsException.java │ │ │ ├── ViewNotFoundException.java │ │ │ ├── DataverseNotFoundException.java │ │ │ ├── SeedNodeOutdatedException.java │ │ │ ├── GlobalConfigNotFoundException.java │ │ │ ├── MutationTokenOutdatedException.java │ │ │ ├── EventingFunctionNotFoundException.java │ │ │ └── JobQueueFullException.java │ │ │ ├── projections │ │ │ └── PathElement.java │ │ │ ├── retry │ │ │ └── package-info.java │ │ │ ├── util │ │ │ └── package-info.java │ │ │ ├── topology │ │ │ └── package-info.java │ │ │ ├── msg │ │ │ ├── Encodable.java │ │ │ ├── chunk │ │ │ │ ├── ChunkRow.java │ │ │ │ ├── ChunkHeader.java │ │ │ │ └── ChunkTrailer.java │ │ │ ├── ScopedRequest.java │ │ │ ├── UnmonitoredRequest.java │ │ │ ├── TargetedRequest.java │ │ │ └── kv │ │ │ │ └── NoopResponse.java │ │ │ ├── json │ │ │ └── stream │ │ │ │ └── package-info.java │ │ │ ├── service │ │ │ └── ServiceScope.java │ │ │ ├── cnc │ │ │ ├── apptelemetry │ │ │ │ ├── package-info.java │ │ │ │ ├── reporter │ │ │ │ │ └── package-info.java │ │ │ │ └── collector │ │ │ │ │ ├── package-info.java │ │ │ │ │ └── Reportable.java │ │ │ ├── metrics │ │ │ │ ├── NoopCounter.java │ │ │ │ └── NoopValueRecorder.java │ │ │ ├── ValueRecorder.java │ │ │ └── Counter.java │ │ │ ├── diagnostics │ │ │ └── PingState.java │ │ │ ├── manager │ │ │ ├── CoreQueryType.java │ │ │ └── bucket │ │ │ │ └── CoreCreateBucketSettings.java │ │ │ ├── kv │ │ │ └── CoreScanType.java │ │ │ ├── compression │ │ │ └── snappy │ │ │ │ └── repackaged │ │ │ │ └── org │ │ │ │ └── iq80 │ │ │ │ └── snappy │ │ │ │ └── v04 │ │ │ │ └── package-info.java │ │ │ ├── config │ │ │ └── ConfigRefreshFailure.java │ │ │ ├── env │ │ │ └── RequestCallback.java │ │ │ └── io │ │ │ └── netty │ │ │ └── HttpChannelContext.java │ └── integrationTest │ │ └── resources │ │ ├── log4j2-test.xml │ │ └── integration.properties └── README.md ├── scala-client └── src │ ├── test │ ├── scala │ │ └── com │ │ │ └── couchbase │ │ │ └── client │ │ │ └── scala │ │ │ ├── demos │ │ │ └── README.md │ │ │ └── search │ │ │ └── queries │ │ │ └── SearchQuerySpec.scala │ └── resources │ │ └── sdk-testcases │ │ ├── README.md │ │ ├── kv │ │ └── projection-doc.json │ │ ├── query │ │ ├── syntax-error-3000.json │ │ ├── prepared-statement-4070.json │ │ └── enhanced-prepared-4040.json │ │ └── analytics │ │ ├── timeout.json │ │ └── syntax-error-24000.json │ ├── main │ ├── resources-filtered │ │ └── com │ │ │ └── couchbase │ │ │ └── client │ │ │ └── scala │ │ │ └── version.properties │ ├── scala │ │ └── com │ │ │ └── couchbase │ │ │ └── client │ │ │ └── scala │ │ │ ├── kv │ │ │ └── ExistsResult.scala │ │ │ ├── util │ │ │ └── RowTraversalUtil.scala │ │ │ ├── DefaultResources.scala │ │ │ ├── search │ │ │ └── HighlightStyle.scala │ │ │ └── env │ │ │ └── PasswordAuthenticator.scala │ ├── scala-2 │ │ └── com │ │ │ └── couchbase │ │ │ └── client │ │ │ └── scala │ │ │ ├── manager │ │ │ ├── view │ │ │ │ ├── View.scala │ │ │ │ └── DesignDocument.scala │ │ │ ├── collection │ │ │ │ └── ScopeSpec.scala │ │ │ └── analytics │ │ │ │ └── AnalyticsIndex.scala │ │ │ └── env │ │ │ └── package.scala │ ├── scala-3 │ │ ├── scala │ │ │ └── compat │ │ │ │ └── java8 │ │ │ │ └── Shims.scala │ │ └── com │ │ │ └── couchbase │ │ │ └── client │ │ │ └── scala │ │ │ ├── env │ │ │ └── JavaCoreEnvBuilder.scala │ │ │ └── Bucket.scala │ └── java │ │ └── com │ │ └── couchbase │ │ └── client │ │ └── scala │ │ └── internal │ │ └── JavadocPlaceholder.java │ └── integrationTest │ └── resources │ ├── logback.xml │ └── integration.properties ├── java-client └── src │ ├── test │ ├── resources │ │ ├── sdk-testcases │ │ │ ├── README.md │ │ │ ├── kv │ │ │ │ └── projection-doc.json │ │ │ ├── query │ │ │ │ ├── syntax-error-3000.json │ │ │ │ ├── prepared-statement-4070.json │ │ │ │ └── enhanced-prepared-4040.json │ │ │ └── analytics │ │ │ │ ├── timeout.json │ │ │ │ └── syntax-error-24000.json │ │ └── com │ │ │ └── couchbase │ │ │ └── client │ │ │ └── java │ │ │ └── manager │ │ │ └── eventing │ │ │ └── single_export.json │ └── java │ │ └── com │ │ └── couchbase │ │ └── client │ │ └── java │ │ └── codec │ │ └── DefaultJsonSerializerTest.java │ ├── main │ ├── resources-filtered │ │ └── com │ │ │ └── couchbase │ │ │ └── client │ │ │ └── java │ │ │ └── version.properties │ └── java │ │ └── com │ │ └── couchbase │ │ └── client │ │ └── java │ │ ├── transactions │ │ └── .editorconfig │ │ ├── json │ │ ├── package-info.java │ │ └── JsonNull.java │ │ ├── search │ │ ├── facet │ │ │ └── package-info.java │ │ ├── sort │ │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── result │ │ │ └── package-info.java │ │ ├── queries │ │ │ └── package-info.java │ │ └── HighlightStyle.java │ │ ├── manager │ │ ├── package-info.java │ │ ├── user │ │ │ └── package-info.java │ │ ├── bucket │ │ │ └── package-info.java │ │ ├── query │ │ │ └── package-info.java │ │ └── eventing │ │ │ ├── EventingFunctionBucketAccess.java │ │ │ └── EventingFunctionUrlNoAuth.java │ │ ├── package-info.java │ │ ├── query │ │ └── package-info.java │ │ ├── view │ │ ├── package-info.java │ │ ├── ViewOrdering.java │ │ └── DesignDocumentNamespace.java │ │ ├── env │ │ ├── package-info.java │ │ └── ClusterPropertyLoader.java │ │ ├── analytics │ │ └── package-info.java │ │ ├── kv │ │ └── package-info.java │ │ ├── codec │ │ └── package-info.java │ │ ├── encryption │ │ └── databind │ │ │ └── jackson │ │ │ ├── package-info.java │ │ │ └── repackaged │ │ │ └── package-info.java │ │ └── batch │ │ └── BatchHelperFailureException.java │ └── integrationTest │ └── resources │ ├── log4j2-test.xml │ ├── logging.properties │ └── integration.properties ├── kotlin-client └── src │ ├── main │ ├── resources-filtered │ │ └── com │ │ │ └── couchbase │ │ │ └── client │ │ │ └── kotlin │ │ │ └── version.properties │ └── kotlin │ │ └── com │ │ └── couchbase │ │ └── client │ │ └── kotlin │ │ ├── kv │ │ ├── MutateInMacro.kt │ │ └── ExistsResult.kt │ │ ├── search │ │ └── Score.kt │ │ ├── view │ │ ├── ViewOrdering.kt │ │ ├── DesignDocumentNamespace.kt │ │ └── ViewErrorMode.kt │ │ ├── codec │ │ └── JsonSerializer.kt │ │ ├── analytics │ │ └── AnalyticsWarning.kt │ │ └── manager │ │ └── view │ │ └── View.kt │ ├── test │ └── resources │ │ ├── junit-platform.properties │ │ └── log4j2-test.xml │ └── integrationTest │ └── resources │ ├── junit-platform.properties │ └── integration.properties ├── columnar-java-client ├── src │ ├── main │ │ ├── resources-filtered │ │ │ └── com │ │ │ │ └── couchbase │ │ │ │ └── columnar │ │ │ │ └── client │ │ │ │ └── java │ │ │ │ └── version.properties │ │ └── java │ │ │ └── com │ │ │ └── couchbase │ │ │ └── columnar │ │ │ └── client │ │ │ └── java │ │ │ ├── QueryPriority.java │ │ │ ├── json │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ ├── internal │ │ │ ├── JsonSerializer.java │ │ │ └── package-info.java │ │ │ ├── codec │ │ │ └── package-info.java │ │ │ └── InvalidCredentialException.java │ └── test │ │ ├── resources │ │ └── log4j2-test.xml │ │ └── java │ │ └── com │ │ └── couchbase │ │ └── columnar │ │ └── client │ │ └── java │ │ └── examples │ │ └── codec │ │ └── package-info.java └── examples │ └── maven-project-template │ ├── README.md │ ├── src │ └── main │ │ └── resources │ │ └── log4j2.xml │ ├── checkstyle.xml │ └── .mvn │ └── wrapper │ └── maven-wrapper.properties ├── metrics-opentelemetry └── src │ ├── main │ └── resources-filtered │ │ └── com │ │ └── couchbase │ │ └── client │ │ └── metrics │ │ └── opentelemetry │ │ └── version.properties │ └── integrationTest │ └── resources │ ├── log4j2-test.xml │ └── integration.properties ├── core-fit-performer ├── .editorconfig └── src │ └── main │ └── java │ └── com │ └── couchbase │ └── client │ └── performer │ └── core │ ├── bounds │ └── BoundsExecutor.java │ └── util │ └── TimeUtil.java ├── CODE_OF_CONDUCT.md ├── .gitignore ├── Makefile ├── scala-implicits ├── README.md └── src │ └── main │ └── java │ └── com │ └── couchbase │ └── client │ └── scala │ └── internal │ └── JavadocPlaceholder.java ├── test-utils ├── README.md └── src │ └── main │ └── java │ └── com │ └── couchbase │ └── client │ └── test │ ├── ClusterType.java │ ├── ServerVersions.java │ ├── Services.java │ └── IgnoreWhenContainer.java ├── metrics-micrometer └── src │ └── integrationTest │ └── resources │ ├── log4j2-test.xml │ └── integration.properties ├── tracing-opentelemetry └── src │ └── integrationTest │ └── resources │ ├── log4j2-test.xml │ └── integration.properties ├── tracing-opentracing └── src │ └── integrationTest │ └── resources │ ├── log4j2-test.xml │ └── integration.properties ├── tracing-micrometer-observation └── src │ └── integrationTest │ └── resources │ ├── log4j2-test.xml │ └── integration.properties ├── config └── checkstyle │ ├── checkstyle-suppressions.xml │ └── checkstyle-header.txt ├── .scalafmt.conf ├── java-examples └── src │ └── main │ └── resources │ └── log4j2.xml ├── columnar-fit-performer-shared └── src │ └── main │ └── java │ └── com │ └── couchbase │ └── columnar │ └── fit │ └── core │ ├── exceptions │ └── GrpcUnimplemented.java │ └── util │ ├── StartTimes.java │ └── TimeUtil.java └── .github └── dependabot.yml /.mvn/maven.config: -------------------------------------------------------------------------------- 1 | -Drevision=3.11.0-SNAPSHOT 2 | -------------------------------------------------------------------------------- /core-io-deps/.gitignore: -------------------------------------------------------------------------------- 1 | dependency-reduced-pom.xml 2 | -------------------------------------------------------------------------------- /java-fit-performer/Dockerfile.dockerignore: -------------------------------------------------------------------------------- 1 | **/target 2 | -------------------------------------------------------------------------------- /kotlin-fit-performer/Dockerfile.dockerignore: -------------------------------------------------------------------------------- 1 | **/target 2 | -------------------------------------------------------------------------------- /scala-fit-performer/Dockerfile.dockerignore: -------------------------------------------------------------------------------- 1 | **/target 2 | -------------------------------------------------------------------------------- /columnar-java-fit-performer/Dockerfile.dockerignore: -------------------------------------------------------------------------------- 1 | **/target 2 | -------------------------------------------------------------------------------- /protostellar/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore generated gRPC code 2 | src/main/java 3 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_empty_list.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /java-fit-performer/src/main/java/com/couchbase/twoway/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.java] 2 | indent_size = 4 3 | -------------------------------------------------------------------------------- /scala-client/src/test/scala/com/couchbase/client/scala/demos/README.md: -------------------------------------------------------------------------------- 1 | Code for examples, demos, etc. -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/couchbase-jvm-clients/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /java-client/src/test/resources/sdk-testcases/README.md: -------------------------------------------------------------------------------- 1 | # sdk-testcases 2 | A collection of test cases for the SDKs to utilise 3 | -------------------------------------------------------------------------------- /scala-client/src/test/resources/sdk-testcases/README.md: -------------------------------------------------------------------------------- 1 | # sdk-testcases 2 | A collection of test cases for the SDKs to utilise 3 | -------------------------------------------------------------------------------- /core-io/src/main/resources-filtered/com/couchbase/client/core/version.properties: -------------------------------------------------------------------------------- 1 | version=${project.version} 2 | gitHash=${buildNumber} 3 | -------------------------------------------------------------------------------- /java-client/src/main/resources-filtered/com/couchbase/client/java/version.properties: -------------------------------------------------------------------------------- 1 | version=${project.version} 2 | gitHash=${buildNumber} 3 | -------------------------------------------------------------------------------- /core-io/src/main/resources/META-INF/services/com.couchbase.client.core.env.ConfigurationProfile: -------------------------------------------------------------------------------- 1 | com.couchbase.client.core.env.WanDevelopmentProfile -------------------------------------------------------------------------------- /kotlin-client/src/main/resources-filtered/com/couchbase/client/kotlin/version.properties: -------------------------------------------------------------------------------- 1 | version=${project.version} 2 | gitHash=${buildNumber} 3 | -------------------------------------------------------------------------------- /scala-client/src/main/resources-filtered/com/couchbase/client/scala/version.properties: -------------------------------------------------------------------------------- 1 | version=${project.version} 2 | gitHash=${buildNumber} 3 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/api/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.java] 2 | indent_size = 2 3 | tab_width = 2 4 | ij_continuation_indent_size = 4 5 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/classic/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.java] 2 | indent_size = 2 3 | tab_width = 2 4 | ij_continuation_indent_size = 4 5 | -------------------------------------------------------------------------------- /columnar-java-client/src/main/resources-filtered/com/couchbase/columnar/client/java/version.properties: -------------------------------------------------------------------------------- 1 | version=${project.version} 2 | gitHash=${buildNumber} 3 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_unknown.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 9999, 4 | "msg": "a generic error" 5 | } 6 | ] -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/transactions/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.java] 2 | indent_size = 4 3 | tab_width = 4 4 | ij_continuation_indent_size = 4 5 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_streaming.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 1080, 4 | "msg": "Timeout foo exceeded" 5 | } 6 | ] -------------------------------------------------------------------------------- /metrics-opentelemetry/src/main/resources-filtered/com/couchbase/client/metrics/opentelemetry/version.properties: -------------------------------------------------------------------------------- 1 | version=${project.version} 2 | gitHash=${buildNumber} 3 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_planning_4000.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 4000, 4 | "msg": "Generic Plan Error" 5 | } 6 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_dml_failure.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 12009, 4 | "msg": "Some other KV error happened" 5 | } 6 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_internal_5000.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 5000, 4 | "msg": "some internal error happened" 5 | } 6 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_rate_limited_1191.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 1191, 4 | "msg": "a rate limit error message" 5 | } 6 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_rate_limited_1192.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 1192, 4 | "msg": "a rate limit error message" 5 | } 6 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_rate_limited_1193.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 1193, 4 | "msg": "a rate limit error message" 5 | } 6 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_rate_limited_1194.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 1194, 4 | "msg": "a rate limit error message" 5 | } 6 | ] -------------------------------------------------------------------------------- /core-fit-performer/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.java] 2 | indent_size = 4 3 | ij_continuation_indent_size = 8 4 | ij_java_keep_simple_methods_in_one_line = true 5 | ij_java_spaces_within_braces = true 6 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_index_12000.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 12000, 4 | "msg": "Some generic index failure happened." 5 | } 6 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_index_14000.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 14000, 4 | "msg": "Some generic index failure happened." 5 | } 6 | ] -------------------------------------------------------------------------------- /java-fit-performer/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.java] 2 | indent_size = 2 3 | ij_continuation_indent_size = 8 4 | ij_java_keep_simple_methods_in_one_line = true 5 | ij_java_spaces_within_braces = true 6 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_planning_4321.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 4321, 4 | "msg": "Plan error: something internal happened" 5 | } 6 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_query_context.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code":1065, 4 | "msg":"Unrecognized parameter in request: query_context" 5 | } 6 | ] -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | Please refer to the [Couchbase Code of Conduct](https://www.couchbase.com/community-guidelines) 4 | which applies to community members as well as employees. 5 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_preserve_expiry.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code":1065, 4 | "msg":"Unrecognized parameter in request: preserve_expiry" 5 | } 6 | ] -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/transaction/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.java] 2 | indent_size = 4 3 | ij_continuation_indent_size = 8 4 | ij_java_keep_simple_methods_in_one_line = true 5 | ij_java_spaces_within_braces = true 6 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_quota_limited.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 5000, 4 | "msg": "limit for number of indexes that can be created per scope has been reached" 5 | } 6 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_parsing.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 3000, 4 | "msg": "Ambiguous reference to field a (near line 1, column 0).", 5 | "query": "select a" 6 | } 7 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_prepared_4040.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 4040, 4 | "msg": "No such prepared statement: blaa, context: unset", 5 | "query": "execute blaa" 6 | } 7 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_prepared_4050.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 4050, 4 | "msg": "No such prepared statement: blaa, context: unset", 5 | "query": "execute blaa" 6 | } 7 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_prepared_4060.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 4060, 4 | "msg": "No such prepared statement: blaa, context: unset", 5 | "query": "execute blaa" 6 | } 7 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_prepared_4070.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 4070, 4 | "msg": "No such prepared statement: blaa, context: unset", 5 | "query": "execute blaa" 6 | } 7 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_prepared_4080.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 4080, 4 | "msg": "No such prepared statement: blaa, context: unset", 5 | "query": "execute blaa" 6 | } 7 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_prepared_4090.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 4090, 4 | "msg": "No such prepared statement: blaa, context: unset", 5 | "query": "execute blaa" 6 | } 7 | ] -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/build/* 2 | **/target/* 3 | **/out/* 4 | .idea 5 | .gradle 6 | *.iml 7 | dependency-reduced-pom.xml 8 | .flattened-pom.xml 9 | *.log 10 | *.local.properties 11 | node_modules 12 | package-lock.json 13 | .DS_Store 14 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/transaction/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.java] 2 | indent_size = 4 3 | ij_continuation_indent_size = 8 4 | ij_java_keep_simple_methods_in_one_line = true 5 | ij_java_spaces_within_braces = true 6 | -------------------------------------------------------------------------------- /core-io/src/main/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration: -------------------------------------------------------------------------------- 1 | com.couchbase.client.core.deps.io.netty.util.internal.Hidden$NettyBlockHoundIntegration 2 | com.couchbase.client.core.util.CouchbaseBlockHoundIntegration -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_cas_mismatch.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 12009, 4 | "msg": "DML Error, possible causes include CAS mismatch Failed to perform UPDATE - cause: CAS mismatch" 5 | } 6 | ] -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | install: deps-only 2 | @./mvnw install 3 | 4 | deps-only: 5 | @./mvnw --batch-mode -f protostellar/pom.xml clean install 6 | @./mvnw --batch-mode -f core-io-deps/pom.xml clean install 7 | @./mvnw --batch-mode -f tracing-opentelemetry-deps/pom.xml clean install 8 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_auth_10000.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 10000, 4 | "msg": "User does not have credentials to run SELECT queries on default:a. Add role query_select on default:a to allow the query to run." 5 | } 6 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_auth_13014.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 13014, 4 | "msg": "User does not have credentials to run SELECT queries on default:a. Add role query_select on default:a to allow the query to run." 5 | } 6 | ] -------------------------------------------------------------------------------- /scala-client/src/main/scala/com/couchbase/client/scala/kv/ExistsResult.scala: -------------------------------------------------------------------------------- 1 | package com.couchbase.client.scala.kv 2 | 3 | /** The result of an `exists` operation. 4 | * 5 | * @param exists whether the document exists 6 | */ 7 | case class ExistsResult(exists: Boolean, cas: Long) 8 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_index_not_found_12004.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 12004, 4 | "msg": "Index Not Found - cause: GSI index bla not found.", 5 | "reason": { 6 | "name": "bla" 7 | }, 8 | "retry": true 9 | } 10 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_index_not_found_12016.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 12016, 4 | "msg": "Index Not Found - cause: GSI index bla not found.", 5 | "reason": { 6 | "name": "bla" 7 | }, 8 | "retry": true 9 | } 10 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_index_not_found_5000.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 5000, 4 | "msg": "Index Not Found - cause: GSI index bla not found.", 5 | "reason": { 6 | "name": "bla" 7 | }, 8 | "retry": true 9 | } 10 | ] -------------------------------------------------------------------------------- /scala-implicits/README.md: -------------------------------------------------------------------------------- 1 | # Scala Implicits 2 | Scala macros allow doing code manipulation at compile time, and it's a technique used by the Scala client. 3 | 4 | However, due to technical limitations of the Scala compiler, the macro code must be in a separate project to the one 5 | in which it's used. -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_index_exists_4300.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 4300, 4 | "msg": "The index #primary already exists.", 5 | "reason": { 6 | "name": "#primary" 7 | }, 8 | "query": "create primary index on `travel-sample`" 9 | } 10 | ] -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_index_exists_5000.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 5000, 4 | "msg": "The Index #primary already exists.", 5 | "reason": { 6 | "name": "#primary" 7 | }, 8 | "query": "create primary index on `travel-sample`" 9 | } 10 | ] -------------------------------------------------------------------------------- /test-utils/README.md: -------------------------------------------------------------------------------- 1 | # Test Utilities 2 | 3 | This project is not intended to be published to any repository, but rather being included in each top-level project as part of the testing and/or integration testing suite. 4 | 5 | For now, this project mainly includes utility classes to automatice integration testing against the mock, docker and so forth. -------------------------------------------------------------------------------- /core-io/README.md: -------------------------------------------------------------------------------- 1 | # Couchbase JVM Core IO 2 | 3 | **Please Note:** The core layer is considered volatile, unsupported API if used directly. While it is stable and 4 | actively maintained, we are not making any guarantees w.r.t stability across releases. Please rely on the higher level 5 | bindings such as `java-client` if you need a stable API to work against. -------------------------------------------------------------------------------- /scala-client/src/integrationTest/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /columnar-java-client/examples/maven-project-template/README.md: -------------------------------------------------------------------------------- 1 | # Columnar Maven project template 2 | 3 | This directory contains an example Maven project you can use to get started with the Couchbase Columnar Java SDK. 4 | 5 | It contains a Maven `pom.xml` configured with the required dependencies. 6 | 7 | There's also a Checkstyle rule that prevents importing classes that are not part of the SDK's public API. 8 | -------------------------------------------------------------------------------- /kotlin-fit-performer/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /scala-fit-performer/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /kotlin-client/src/test/resources/junit-platform.properties: -------------------------------------------------------------------------------- 1 | # """ 2 | # If you are authoring tests using the Kotlin programming language, 3 | # you may also find it easier to implement @BeforeAll and @AfterAll 4 | # methods by switching to the "per-class" test instance lifecycle mode. 5 | # """ -- https://junit.org/junit5/docs/current/user-guide/#writing-tests-test-instance-lifecycle 6 | junit.jupiter.testinstance.lifecycle.default=per_class 7 | -------------------------------------------------------------------------------- /kotlin-client/src/integrationTest/resources/junit-platform.properties: -------------------------------------------------------------------------------- 1 | # """ 2 | # If you are authoring tests using the Kotlin programming language, 3 | # you may also find it easier to implement @BeforeAll and @AfterAll 4 | # methods by switching to the "per-class" test instance lifecycle mode. 5 | # """ -- https://junit.org/junit5/docs/current/user-guide/#writing-tests-test-instance-lifecycle 6 | junit.jupiter.testinstance.lifecycle.default=per_class 7 | -------------------------------------------------------------------------------- /core-io/src/integrationTest/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_cas_mismatch_reason.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 12009, 4 | "msg": "DML Error, possible causes include CAS mismatch. Failed to perform UPDATE on key k1 - cause: CAS mismatch", 5 | "reason": { 6 | "caller": "couchbase:2065", 7 | "code": 12033, 8 | "key": "datastore.couchbase.CAS_mismatch", 9 | "message": "CAS mismatch" 10 | }, 11 | "retry": false 12 | } 13 | ] -------------------------------------------------------------------------------- /java-client/src/integrationTest/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_kv_exists.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 12009, 4 | "msg": "DML Error, possible causes include concurrent modification. Failed to perform INSERT on key k1 - cause: Duplicate Key: k1", 5 | "reason": { 6 | "caller": "couchbase:1957", 7 | "code": 17012, 8 | "key": "dml.statement.duplicatekey", 9 | "message": "Duplicate Key: k1" 10 | }, 11 | "retry": false 12 | } 13 | ] -------------------------------------------------------------------------------- /metrics-micrometer/src/integrationTest/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /metrics-opentelemetry/src/integrationTest/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tracing-opentelemetry/src/integrationTest/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tracing-opentracing/src/integrationTest/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/query/failure_kv_notfound.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "code": 12009, 4 | "msg": "DML Error, possible causes include concurrent modification. Failed to perform UPDATE on key k1 - cause: Key not found : k1", 5 | "reason": { 6 | "caller": "couchbase:2067", 7 | "code": 17014, 8 | "key": "transaction.statement.keynotfound", 9 | "message": "Key not found : k1" 10 | }, 11 | "retry": false 12 | } 13 | ] -------------------------------------------------------------------------------- /tracing-micrometer-observation/src/integrationTest/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /columnar-java-fit-performer/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /java-client/src/integrationTest/resources/logging.properties: -------------------------------------------------------------------------------- 1 | # GRPC uses java.util.logging, and ProtostellarStatsCollector depends on intercepting ChannelLogger logging. 2 | handlers=java.util.logging.ConsoleHandler 3 | com.couchbase.client.core.deps.io.grpc.ChannelLogger.level=FINEST 4 | java.util.logging.ConsoleHandler.level=FINEST 5 | java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter 6 | java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] [%2$-10s] [%4$-7s] %5$s %n 7 | .level = INFO 8 | -------------------------------------------------------------------------------- /config/checkstyle/checkstyle-suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/kv/error_hello_response.txt: -------------------------------------------------------------------------------- 1 | +-------------------------------------------------+ 2 | | 0 1 2 3 4 5 6 7 8 9 a b c d e f | 3 | +--------+-------------------------------------------------+----------------+ 4 | |00000000| 81 1f 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 5 | |00000010| 00 00 00 00 00 00 00 00 |........ | 6 | +--------+-------------------------------------------------+----------------+ -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/msg/kv/get_response_not_found.txt: -------------------------------------------------------------------------------- 1 | +-------------------------------------------------+ 2 | | 0 1 2 3 4 5 6 7 8 9 a b c d e f | 3 | +--------+-------------------------------------------------+----------------+ 4 | |00000000| 81 00 00 00 00 00 00 01 00 00 00 00 00 00 00 07 |................| 5 | |00000010| 00 00 00 00 00 00 00 00 |........ | 6 | +--------+-------------------------------------------------+----------------+ -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/kv/error_errormap_response.txt: -------------------------------------------------------------------------------- 1 | +-------------------------------------------------+ 2 | | 0 1 2 3 4 5 6 7 8 9 a b c d e f | 3 | +--------+-------------------------------------------------+----------------+ 4 | |00000000| 17 fe 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 5 | |00000010| 00 00 00 00 00 00 00 00 |........ | 6 | +--------+-------------------------------------------------+----------------+ -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/kv/success_empty_errormap_response.txt: -------------------------------------------------------------------------------- 1 | +-------------------------------------------------+ 2 | | 0 1 2 3 4 5 6 7 8 9 a b c d e f | 3 | +--------+-------------------------------------------------+----------------+ 4 | |00000000| 18 fe 03 00 00 00 00 00 00 00 00 03 00 00 00 00 |................| 5 | |00000010| 00 00 00 00 00 00 00 00 02 00 58 |..........X{. | 6 | +--------+-------------------------------------------------+----------------+ -------------------------------------------------------------------------------- /core-io/src/test/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/kv/success_sasl_list_mechs_empty_response.txt: -------------------------------------------------------------------------------- 1 | +-------------------------------------------------+ 2 | | 0 1 2 3 4 5 6 7 8 9 a b c d e f | 3 | +--------+-------------------------------------------------+----------------+ 4 | |00000000| 18 20 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |. ..............| 5 | |00000010| 00 00 00 00 00 00 00 00 |........ | 6 | +--------+-------------------------------------------------+----------------+ -------------------------------------------------------------------------------- /.scalafmt.conf: -------------------------------------------------------------------------------- 1 | version=3.9.8 2 | # Starting point was https://copperlight.github.io/scala/scalafmt-configuration-tips/ 3 | # https://scalameta.org/scalafmt/docs/configuration.html 4 | align.preset = more 5 | maxColumn = 100 6 | lineEndings=preserve 7 | runner.dialect = scala213 8 | fileOverride { 9 | "glob:**/src/*/scala-3/**" { 10 | runner.dialect = scala3 11 | } 12 | "glob:**/src/*/scala-2.13-/**" { 13 | runner.dialect = scala212 14 | } 15 | } 16 | 17 | docstrings.wrap = no 18 | newlines.implicitParamListModifierPrefer = before 19 | -------------------------------------------------------------------------------- /kotlin-client/src/test/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/config/global_config_mad_hatter_single_node.json: -------------------------------------------------------------------------------- 1 | {"rev":26,"nodesExt":[{"services":{"mgmt":8091,"mgmtSSL":18091,"indexAdmin":9100,"indexScan":9101,"indexHttp":9102,"indexStreamInit":9103,"indexStreamCatchup":9104,"indexStreamMaint":9105,"indexHttps":19102,"kv":11210,"kvSSL":11207,"capi":8092,"capiSSL":18092,"projector":9999,"projector":9999,"n1ql":8093,"n1qlSSL":18093},"thisNode":true}],"clusterCapabilitiesVer":[1,0],"clusterCapabilities":{"n1ql":["enhancedPreparedStatements", "somethingOdd"], "eventing": ["somethingWeird"]}} -------------------------------------------------------------------------------- /scala-client/src/test/scala/com/couchbase/client/scala/search/queries/SearchQuerySpec.scala: -------------------------------------------------------------------------------- 1 | package com.couchbase.client.scala.search.queries 2 | 3 | import com.couchbase.client.scala.json.JsonObject 4 | import org.junit.jupiter.api.Assertions.assertEquals 5 | import org.junit.jupiter.api.Test 6 | 7 | class SearchQuerySpec { 8 | @Test 9 | def searchQueryToStringReturnsQueryJson(): Unit = { 10 | assertEquals( 11 | JsonObject.create.put("match", "foo"), 12 | JsonObject.fromJson(SearchQuery.matchQuery("foo").toString) 13 | ) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /columnar-java-client/src/test/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/kv/request_key_only.txt: -------------------------------------------------------------------------------- 1 | +-------------------------------------------------+ 2 | | 0 1 2 3 4 5 6 7 8 9 a b c d e f | 3 | +--------+-------------------------------------------------+----------------+ 4 | |00000000| 80 00 00 0a 00 00 00 29 00 00 00 0a 00 00 00 01 |.......)........| 5 | |00000010| 00 00 00 00 00 00 00 00 61 69 72 6c 69 6e 65 5f |........airline_| 6 | |00000020| 31 30 |10 | 7 | +--------+-------------------------------------------------+----------------+ -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/kv/success_hello_response.txt: -------------------------------------------------------------------------------- 1 | +-------------------------------------------------+ 2 | | 0 1 2 3 4 5 6 7 8 9 a b c d e f | 3 | +--------+-------------------------------------------------+----------------+ 4 | |00000000| 81 1f 00 00 00 00 00 00 00 00 00 0c 00 00 00 00 |................| 5 | |00000010| 00 00 00 00 00 00 00 00 00 03 00 06 00 07 00 08 |................| 6 | |00000020| 00 0a 00 0f |.... | 7 | +--------+-------------------------------------------------+----------------+ -------------------------------------------------------------------------------- /columnar-java-client/examples/maven-project-template/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /columnar-java-client/examples/maven-project-template/checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/kv/MutateInMacro.kt: -------------------------------------------------------------------------------- 1 | package com.couchbase.client.kotlin.kv 2 | 3 | import com.couchbase.client.kotlin.annotations.VolatileCouchbaseApi 4 | 5 | @VolatileCouchbaseApi 6 | public open class MutateInMacro internal constructor(internal val value: String) { 7 | public object Cas : MutateInMacro("\${Mutation.CAS}") 8 | public object SeqNo : MutateInMacro("\${Mutation.seqno}") 9 | public object ValueCrc32c : MutateInMacro("\${Mutation.value_crc32c}") 10 | 11 | override fun toString(): String { 12 | return "MutateInMacro(value='$value')" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /config/checkstyle/checkstyle-header.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ -------------------------------------------------------------------------------- /java-client/src/test/resources/sdk-testcases/kv/projection-doc.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Emmy-lou Dickerson", 3 | "age": 26, 4 | "animals": ["cat", "dog", "parrot"], 5 | "attributes": { 6 | "hair": "brown", 7 | "dimensions": { 8 | "height": 67, 9 | "weight": 175 10 | }, 11 | "hobbies": [ 12 | { 13 | "type": "winter sports", 14 | "name": "curling" 15 | }, 16 | { 17 | "type": "summer sports", 18 | "name": "water skiing", 19 | "details": { 20 | "location": { 21 | "lat": 49.282730, 22 | "long": -123.120735 23 | } 24 | } 25 | } 26 | ] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /scala-client/src/test/resources/sdk-testcases/kv/projection-doc.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Emmy-lou Dickerson", 3 | "age": 26, 4 | "animals": ["cat", "dog", "parrot"], 5 | "attributes": { 6 | "hair": "brown", 7 | "dimensions": { 8 | "height": 67, 9 | "weight": 175 10 | }, 11 | "hobbies": [ 12 | { 13 | "type": "winter sports", 14 | "name": "curling" 15 | }, 16 | { 17 | "type": "summer sports", 18 | "name": "water skiing", 19 | "details": { 20 | "location": { 21 | "lat": 49.282730, 22 | "long": -123.120735 23 | } 24 | } 25 | } 26 | ] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core-io/src/integrationTest/resources/integration.properties: -------------------------------------------------------------------------------- 1 | # Couchbase Integration-Test Default Properties 2 | 3 | # If set to unmanaged, it is assumed that the host is managing the cluster and 4 | # as a result no containers or anything will be spun up. 5 | # Options: mocked, unmanaged 6 | cluster.type=mocked 7 | 8 | # Default configs for both cases 9 | cluster.adminUsername=Administrator 10 | cluster.adminPassword=password 11 | 12 | # Default configs for the mocked environment 13 | cluster.mocked.numNodes=1 14 | cluster.mocked.numReplicas=0 15 | 16 | # Entry point configuration if not managed 17 | # value of hostname and ns_server port 18 | cluster.unmanaged.seed=127.0.0.1:8091 19 | cluster.unmanaged.numReplicas=1 20 | -------------------------------------------------------------------------------- /java-examples/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /java-client/src/integrationTest/resources/integration.properties: -------------------------------------------------------------------------------- 1 | # Couchbase Integration-Test Default Properties 2 | 3 | # If set to unmanaged, it is assumed that the host is managing the cluster and 4 | # as a result no containers or anything will be spun up. 5 | # Options: mocked, unmanaged 6 | cluster.type=mocked 7 | 8 | # Default configs for both cases 9 | cluster.adminUsername=Administrator 10 | cluster.adminPassword=password 11 | 12 | # Default configs for the mocked environment 13 | cluster.mocked.numNodes=1 14 | cluster.mocked.numReplicas=0 15 | 16 | # Entry point configuration if not managed 17 | # value of hostname and ns_server port 18 | cluster.unmanaged.seed=127.0.0.1:8091 19 | cluster.unmanaged.numReplicas=0 20 | -------------------------------------------------------------------------------- /kotlin-client/src/integrationTest/resources/integration.properties: -------------------------------------------------------------------------------- 1 | # Couchbase Integration-Test Default Properties 2 | 3 | # If set to unmanaged, it is assumed that the host is managing the cluster and 4 | # as a result no containers or anything will be spun up. 5 | # Options: mocked, unmanaged 6 | cluster.type=mocked 7 | 8 | # Default configs for both cases 9 | cluster.adminUsername=Administrator 10 | cluster.adminPassword=password 11 | 12 | # Default configs for the mocked environment 13 | cluster.mocked.numNodes=1 14 | cluster.mocked.numReplicas=0 15 | 16 | # Entry point configuration if not managed 17 | # value of hostname and ns_server port 18 | cluster.unmanaged.seed=127.0.0.1:8091 19 | cluster.unmanaged.numReplicas=0 20 | -------------------------------------------------------------------------------- /kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/search/Score.kt: -------------------------------------------------------------------------------- 1 | package com.couchbase.client.kotlin.search 2 | 3 | import com.couchbase.client.core.annotation.SinceCouchbase 4 | 5 | public sealed class Score { 6 | public companion object { 7 | /** 8 | * Calculate a score for each hit. 9 | */ 10 | public fun default(): Score = Default 11 | 12 | /** 13 | * Assign all hits a score of zero, for improved performance 14 | * when scores are not required. 15 | */ 16 | @SinceCouchbase("6.6.1") 17 | public fun none(): Score = None 18 | } 19 | 20 | internal object Default : Score() 21 | internal object None : Score() 22 | } 23 | -------------------------------------------------------------------------------- /scala-client/src/integrationTest/resources/integration.properties: -------------------------------------------------------------------------------- 1 | # Couchbase Integration-Test Default Properties 2 | 3 | # If set to unmanaged, it is assumed that the host is managing the cluster and 4 | # as a result no containers or anything will be spun up. 5 | # Options: mocked, unmanaged 6 | cluster.type=mocked 7 | 8 | # Default configs for both cases 9 | cluster.adminUsername=Administrator 10 | cluster.adminPassword=password 11 | 12 | # Default configs for the mocked environment 13 | cluster.mocked.numNodes=1 14 | cluster.mocked.numReplicas=0 15 | 16 | # Entry point configuration if not managed 17 | # value of hostname and ns_server port 18 | cluster.unmanaged.seed=127.0.0.1:8091 19 | cluster.unmanaged.numReplicas=0 20 | -------------------------------------------------------------------------------- /metrics-micrometer/src/integrationTest/resources/integration.properties: -------------------------------------------------------------------------------- 1 | # Couchbase Integration-Test Default Properties 2 | 3 | # If set to unmanaged, it is assumed that the host is managing the cluster and 4 | # as a result no containers or anything will be spun up. 5 | # Options: mocked, unmanaged 6 | cluster.type=mocked 7 | 8 | # Default configs for both cases 9 | cluster.adminUsername=Administrator 10 | cluster.adminPassword=password 11 | 12 | # Default configs for the mocked environment 13 | cluster.mocked.numNodes=1 14 | cluster.mocked.numReplicas=0 15 | 16 | # Entry point configuration if not managed 17 | # value of hostname and ns_server port 18 | cluster.unmanaged.seed=127.0.0.1:8091 19 | cluster.unmanaged.numReplicas=0 20 | -------------------------------------------------------------------------------- /tracing-opentracing/src/integrationTest/resources/integration.properties: -------------------------------------------------------------------------------- 1 | # Couchbase Integration-Test Default Properties 2 | 3 | # If set to unmanaged, it is assumed that the host is managing the cluster and 4 | # as a result no containers or anything will be spun up. 5 | # Options: mocked, unmanaged 6 | cluster.type=mocked 7 | 8 | # Default configs for both cases 9 | cluster.adminUsername=Administrator 10 | cluster.adminPassword=password 11 | 12 | # Default configs for the mocked environment 13 | cluster.mocked.numNodes=1 14 | cluster.mocked.numReplicas=0 15 | 16 | # Entry point configuration if not managed 17 | # value of hostname and ns_server port 18 | cluster.unmanaged.seed=127.0.0.1:8091 19 | cluster.unmanaged.numReplicas=0 20 | -------------------------------------------------------------------------------- /metrics-opentelemetry/src/integrationTest/resources/integration.properties: -------------------------------------------------------------------------------- 1 | # Couchbase Integration-Test Default Properties 2 | 3 | # If set to unmanaged, it is assumed that the host is managing the cluster and 4 | # as a result no containers or anything will be spun up. 5 | # Options: mocked, unmanaged 6 | cluster.type=mocked 7 | 8 | # Default configs for both cases 9 | cluster.adminUsername=Administrator 10 | cluster.adminPassword=password 11 | 12 | # Default configs for the mocked environment 13 | cluster.mocked.numNodes=1 14 | cluster.mocked.numReplicas=0 15 | 16 | # Entry point configuration if not managed 17 | # value of hostname and ns_server port 18 | cluster.unmanaged.seed=127.0.0.1:8091 19 | cluster.unmanaged.numReplicas=0 20 | -------------------------------------------------------------------------------- /tracing-opentelemetry/src/integrationTest/resources/integration.properties: -------------------------------------------------------------------------------- 1 | # Couchbase Integration-Test Default Properties 2 | 3 | # If set to unmanaged, it is assumed that the host is managing the cluster and 4 | # as a result no containers or anything will be spun up. 5 | # Options: mocked, unmanaged 6 | cluster.type=mocked 7 | 8 | # Default configs for both cases 9 | cluster.adminUsername=Administrator 10 | cluster.adminPassword=password 11 | 12 | # Default configs for the mocked environment 13 | cluster.mocked.numNodes=1 14 | cluster.mocked.numReplicas=0 15 | 16 | # Entry point configuration if not managed 17 | # value of hostname and ns_server port 18 | cluster.unmanaged.seed=127.0.0.1:8091 19 | cluster.unmanaged.numReplicas=0 20 | -------------------------------------------------------------------------------- /tracing-micrometer-observation/src/integrationTest/resources/integration.properties: -------------------------------------------------------------------------------- 1 | # Couchbase Integration-Test Default Properties 2 | 3 | # If set to unmanaged, it is assumed that the host is managing the cluster and 4 | # as a result no containers or anything will be spun up. 5 | # Options: mocked, unmanaged 6 | cluster.type=mocked 7 | 8 | # Default configs for both cases 9 | cluster.adminUsername=Administrator 10 | cluster.adminPassword=password 11 | 12 | # Default configs for the mocked environment 13 | cluster.mocked.numNodes=1 14 | cluster.mocked.numReplicas=0 15 | 16 | # Entry point configuration if not managed 17 | # value of hostname and ns_server port 18 | cluster.unmanaged.seed=127.0.0.1:8091 19 | cluster.unmanaged.numReplicas=0 20 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/config/global_config_mad_hatter_multi_node.json: -------------------------------------------------------------------------------- 1 | {"rev":1172,"nodesExt":[{"services":{"mgmt":8091,"mgmtSSL":18091,"indexAdmin":9100,"indexScan":9101,"indexHttp":9102,"indexStreamInit":9103,"indexStreamCatchup":9104,"indexStreamMaint":9105,"indexHttps":19102,"kv":11210,"kvSSL":11207,"capi":8092,"capiSSL":18092,"projector":9999,"projector":9999,"n1ql":8093,"n1qlSSL":18093},"thisNode":true,"hostname":"10.143.193.101"},{"services":{"mgmt":8091,"mgmtSSL":18091,"fts":8094,"ftsSSL":18094,"ftsGRPC":9130,"ftsGRPCSSL":19130,"kv":11210,"kvSSL":11207,"capi":8092,"capiSSL":18092,"projector":9999,"projector":9999},"hostname":"10.143.193.102"}],"clusterCapabilitiesVer":[1,0],"clusterCapabilities":{"n1ql":["enhancedPreparedStatements"]}} -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/kv/error_sasl_list_mechs_response.txt: -------------------------------------------------------------------------------- 1 | +-------------------------------------------------+ 2 | | 0 1 2 3 4 5 6 7 8 9 a b c d e f | 3 | +--------+-------------------------------------------------+----------------+ 4 | |00000000| 18 20 03 00 00 00 00 83 00 00 00 2d 00 00 00 03 |................| 5 | |00000010| 00 00 00 00 00 00 00 00 02 00 03 53 43 52 41 4d |................| 6 | |00000020| 2d 53 48 41 35 31 32 20 53 43 52 41 4d 2d 53 48 |................| 7 | |00000020| 41 32 35 36 20 53 43 52 41 4d 2d 53 48 41 31 20 |................| 8 | |00000020| 50 4c 41 49 4e |..... | 9 | +--------+-------------------------------------------------+----------------+ -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/kv/success_sasl_list_mechs_response.txt: -------------------------------------------------------------------------------- 1 | +-------------------------------------------------+ 2 | | 0 1 2 3 4 5 6 7 8 9 a b c d e f | 3 | +--------+-------------------------------------------------+----------------+ 4 | |00000000| 18 20 03 00 00 00 00 00 00 00 00 2d 00 00 00 03 |................| 5 | |00000010| 00 00 00 00 00 00 00 00 02 00 03 53 43 52 41 4d |................| 6 | |00000020| 2d 53 48 41 35 31 32 20 53 43 52 41 4d 2d 53 48 |................| 7 | |00000020| 41 32 35 36 20 53 43 52 41 4d 2d 53 48 41 31 20 |................| 8 | |00000020| 50 4c 41 49 4e |..... | 9 | +--------+-------------------------------------------------+----------------+ -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/io/netty/kv/success_sasl_list_mechs_unknown_mech_response.txt: -------------------------------------------------------------------------------- 1 | +-------------------------------------------------+ 2 | | 0 1 2 3 4 5 6 7 8 9 a b c d e f | 3 | +--------+-------------------------------------------------+----------------+ 4 | |00000000| 18 20 03 00 00 00 00 00 00 00 00 2d 00 00 00 03 |................| 5 | |00000010| 00 00 00 00 00 00 00 00 02 00 03 53 43 52 41 4d |................| 6 | |00000020| 2d 53 48 41 35 31 32 20 53 43 52 41 4d 2d 53 48 |................| 7 | |00000020| 41 32 35 36 20 53 43 52 41 4d 2d 53 48 41 31 20 |................| 8 | |00000020| 46 4c 41 55 4e |..... | 9 | +--------+-------------------------------------------------+----------------+ -------------------------------------------------------------------------------- /scala-client/src/main/scala/com/couchbase/client/scala/util/RowTraversalUtil.scala: -------------------------------------------------------------------------------- 1 | package com.couchbase.client.scala.util 2 | 3 | import scala.collection.mutable.ArrayBuffer 4 | import scala.util.{Failure, Success, Try} 5 | 6 | object RowTraversalUtil { 7 | def traverse[T](it: Iterator[Try[T]]): Try[collection.Seq[T]] = { 8 | // Not a functional implementation, going for performance 9 | var outFail: Try[_] = null 10 | val out = ArrayBuffer.empty[T] 11 | while (it.hasNext && outFail == null) { 12 | val next = it.next() 13 | next match { 14 | case Success(v) => out += v 15 | case Failure(v) => outFail = next 16 | } 17 | } 18 | if (outFail != null) outFail.asInstanceOf[Try[Seq[T]]] 19 | else Success(out) 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/projections/PathElement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.projections; 17 | 18 | public interface PathElement {} 19 | 20 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/json/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * JSON encoding and decoding. 19 | */ 20 | package com.couchbase.client.java.json; 21 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/search/facet/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Search facets APIs. 19 | */ 20 | package com.couchbase.client.java.search.facet; -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/retry/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @NullMarked 18 | package com.couchbase.client.core.retry; 19 | 20 | import org.jspecify.annotations.NullMarked; 21 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @NullMarked 18 | package com.couchbase.client.core.util; 19 | 20 | import org.jspecify.annotations.NullMarked; 21 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/manager/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Contains all management related APIs. 19 | */ 20 | package com.couchbase.client.java.manager; -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/topology/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @NullMarked 18 | package com.couchbase.client.core.topology; 19 | 20 | import org.jspecify.annotations.NullMarked; 21 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/manager/user/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * APIs related to user management. 19 | */ 20 | package com.couchbase.client.java.manager.user; -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/msg/Encodable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.msg; 18 | 19 | public interface Encodable { 20 | 21 | T encode(); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/manager/bucket/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * APIs related to bucket management. 19 | */ 20 | package com.couchbase.client.java.manager.bucket; -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Holds all classes that are needed for the Couchbase Java SDK. 19 | */ 20 | package com.couchbase.client.java; -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/query/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Namespace for various query-service related classes. 19 | */ 20 | package com.couchbase.client.java.query; -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/search/sort/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Holds classes related to search sorting. 19 | */ 20 | package com.couchbase.client.java.search.sort; -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/view/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Namespace for various view-service related classes. 19 | */ 20 | package com.couchbase.client.java.view; -------------------------------------------------------------------------------- /test-utils/src/main/java/com/couchbase/client/test/ClusterType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.test; 17 | 18 | public enum ClusterType { 19 | MOCKED, 20 | UNMANAGED, 21 | CAPELLA, 22 | } 23 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/json/stream/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @NullMarked 18 | package com.couchbase.client.core.json.stream; 19 | 20 | import org.jspecify.annotations.NullMarked; 21 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/service/ServiceScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.service; 18 | 19 | public enum ServiceScope { 20 | CLUSTER, 21 | BUCKET 22 | } 23 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/search/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Namespace for various search-service related classes. 19 | */ 20 | package com.couchbase.client.java.search; -------------------------------------------------------------------------------- /scala-client/src/main/scala-2/com/couchbase/client/scala/manager/view/View.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.scala.manager.view 17 | 18 | case class View(map: String, reduce: Option[String] = None) 19 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/env/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Holds classes related to the environment and its configuration. 19 | */ 20 | package com.couchbase.client.java.env; -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/search/result/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Holds search result classes and interfaces. 19 | */ 20 | package com.couchbase.client.java.search.result; -------------------------------------------------------------------------------- /columnar-java-client/src/main/java/com/couchbase/columnar/client/java/QueryPriority.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.columnar.client.java; 18 | 19 | public enum QueryPriority { 20 | HIGH, 21 | NORMAL, 22 | } 23 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/cnc/apptelemetry/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @NullMarked 18 | package com.couchbase.client.core.cnc.apptelemetry; 19 | 20 | import org.jspecify.annotations.NullMarked; 21 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/diagnostics/PingState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.diagnostics; 18 | 19 | public enum PingState { 20 | OK, 21 | TIMEOUT, 22 | ERROR 23 | } 24 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/analytics/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Namespace for various analytics-service related classes. 19 | */ 20 | package com.couchbase.client.java.analytics; -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/manager/query/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * APIs related to N1QL query index management. 19 | */ 20 | package com.couchbase.client.java.manager.query; 21 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/search/queries/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Contains the various APIs for search queries. 19 | */ 20 | package com.couchbase.client.java.search.queries; -------------------------------------------------------------------------------- /kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/view/ViewOrdering.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.kotlin.view 18 | 19 | public enum class ViewOrdering { 20 | ASCENDING, 21 | DESCENDING, 22 | } 23 | -------------------------------------------------------------------------------- /java-client/src/test/resources/com/couchbase/client/java/manager/eventing/single_export.json: -------------------------------------------------------------------------------- 1 | [{"appcode":"function OnUpdate(doc, meta) {\n log(\"Doc created/updated\", meta.id);\n}\n\nfunction OnDelete(meta, options) {\n log(\"Doc deleted/expired\", meta.id);\n}","depcfg":{"source_bucket":"travel-sample","source_scope":"inventory","source_collection":"airline","metadata_bucket":"meta","metadata_scope":"_default","metadata_collection":"_default"},"version":"evt-7.0.2-6703-ee","enforce_schema":false,"handleruuid":752413144,"function_instance_id":"vEaNq1","appname":"myfunc","settings":{"dcp_stream_boundary":"everything","deployment_status":false,"description":"bla","execution_timeout":60,"language_compatibility":"6.6.2","log_level":"INFO","n1ql_consistency":"none","num_timer_partitions":128,"processing_status":false,"timer_context_size":1024,"user_prefix":"eventing","worker_count":1}}] -------------------------------------------------------------------------------- /java-client/src/test/resources/sdk-testcases/query/syntax-error-3000.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "http_status": 400, 4 | "description": "This case is representative of a query request containing a syntax error.", 5 | "reproduction": "Send a query request to the server containing a statement with a syntax error.", 6 | "server_version": "6.0.1" 7 | }, 8 | "data": { 9 | "requestID": "fbe9ac66-a7ed-4b09-b1dc-4d3c791d8953", 10 | "clientContextID": "62d29101-0c9f-400d-af2b-9bd44a557a7c", 11 | "errors": [ 12 | { 13 | "code": 3000, 14 | "msg": "syntax error - at *" 15 | } 16 | ], 17 | "status": "fatal", 18 | "metrics": { 19 | "elapsedTime": "837.425µs", 20 | "executionTime": "732.345µs", 21 | "resultCount": 0, 22 | "resultSize": 0, 23 | "errorCount": 1 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /scala-client/src/test/resources/sdk-testcases/query/syntax-error-3000.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "http_status": 400, 4 | "description": "This case is representative of a query request containing a syntax error.", 5 | "reproduction": "Send a query request to the server containing a statement with a syntax error.", 6 | "server_version": "6.0.1" 7 | }, 8 | "data": { 9 | "requestID": "fbe9ac66-a7ed-4b09-b1dc-4d3c791d8953", 10 | "clientContextID": "62d29101-0c9f-400d-af2b-9bd44a557a7c", 11 | "errors": [ 12 | { 13 | "code": 3000, 14 | "msg": "syntax error - at *" 15 | } 16 | ], 17 | "status": "fatal", 18 | "metrics": { 19 | "elapsedTime": "837.425µs", 20 | "executionTime": "732.345µs", 21 | "resultCount": 0, 22 | "resultSize": 0, 23 | "errorCount": 1 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/cnc/apptelemetry/reporter/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @NullMarked 18 | package com.couchbase.client.core.cnc.apptelemetry.reporter; 19 | 20 | import org.jspecify.annotations.NullMarked; 21 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/cnc/apptelemetry/collector/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @NullMarked 18 | package com.couchbase.client.core.cnc.apptelemetry.collector; 19 | 20 | import org.jspecify.annotations.NullMarked; 21 | -------------------------------------------------------------------------------- /columnar-java-client/src/test/java/com/couchbase/columnar/client/java/examples/codec/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @NullMarked 18 | package com.couchbase.columnar.client.java.examples.codec; 19 | 20 | import org.jspecify.annotations.NullMarked; 21 | -------------------------------------------------------------------------------- /kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/view/DesignDocumentNamespace.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.kotlin.view 18 | 19 | public enum class DesignDocumentNamespace { 20 | DEVELOPMENT, 21 | PRODUCTION, 22 | } 23 | 24 | -------------------------------------------------------------------------------- /scala-client/src/main/scala-3/scala/compat/java8/Shims.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package scala.compat.java8 17 | 18 | object OptionConverters: 19 | export scala.jdk.OptionConverters.* 20 | 21 | object FutureConverters: 22 | export scala.jdk.FutureConverters.* -------------------------------------------------------------------------------- /columnar-fit-performer-shared/src/main/java/com/couchbase/columnar/fit/core/exceptions/GrpcUnimplemented.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.columnar.fit.core.exceptions; 18 | 19 | public class GrpcUnimplemented extends RuntimeException { 20 | } 21 | -------------------------------------------------------------------------------- /scala-client/src/main/scala-2/com/couchbase/client/scala/manager/collection/ScopeSpec.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.scala.manager.collection 17 | 18 | case class ScopeSpec(name: String, collections: collection.Seq[CollectionSpec] = Seq()) 19 | -------------------------------------------------------------------------------- /java-fit-performer/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | System.out 7 | true 8 | 9 | 10 | %d{HH:mm:ss.SSS} %thread{10} %-5level %-20F.%-4L %msg%n 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/view/ViewErrorMode.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.kotlin.view 18 | 19 | public enum class ViewErrorMode(internal val encoded: String) { 20 | STOP("stop"), 21 | CONTINUE("continue"), 22 | } 23 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/msg/chunk/ChunkRow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.msg.chunk; 18 | 19 | /** 20 | * Marker interface to describe a row emitted from a chunked response. 21 | */ 22 | public interface ChunkRow { 23 | } 24 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/msg/chunk/ChunkHeader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.msg.chunk; 18 | 19 | /** 20 | * Marker interface to describe the leading bits of a chunked response. 21 | */ 22 | public interface ChunkHeader { 23 | } 24 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/api/kv/CoreReadPreference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.api.kv; 17 | 18 | public enum CoreReadPreference { 19 | NO_PREFERENCE, 20 | PREFERRED_SERVER_GROUP, 21 | PREFERRED_SERVER_GROUP_OR_ALL_AVAILABLE 22 | } 23 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/msg/chunk/ChunkTrailer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.msg.chunk; 18 | 19 | /** 20 | * Marker interface to describe the trailing bits of a chunked response. 21 | */ 22 | public interface ChunkTrailer { 23 | } 24 | -------------------------------------------------------------------------------- /java-client/src/test/resources/sdk-testcases/analytics/timeout.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "http_status": 200, 4 | "description": "This case is representative of a response with an analytics query timeout.", 5 | "reproduction": "Create a travel-sample analytics dataset and send a query with a short (e.g.500ms) timeout.", 6 | "server_version": "6.0" 7 | }, 8 | "data": { 9 | "requestID": "74ed0ec2-8699-417d-b807-599520b70b4c", 10 | "signature": { 11 | "*": "*" 12 | }, 13 | "errors": [ 14 | { 15 | "code": 21002, 16 | "msg": "Request timed out and will be cancelled" 17 | } 18 | ], 19 | "status": "timeout", 20 | "metrics": { 21 | "elapsedTime": "24.187696ms", 22 | "executionTime": "19.366336ms", 23 | "resultCount": 0, 24 | "resultSize": 0, 25 | "processedObjects": 0, 26 | "errorCount": 1 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /scala-client/src/test/resources/sdk-testcases/analytics/timeout.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "http_status": 200, 4 | "description": "This case is representative of a response with an analytics query timeout.", 5 | "reproduction": "Create a travel-sample analytics dataset and send a query with a short (e.g.500ms) timeout.", 6 | "server_version": "6.0" 7 | }, 8 | "data": { 9 | "requestID": "74ed0ec2-8699-417d-b807-599520b70b4c", 10 | "signature": { 11 | "*": "*" 12 | }, 13 | "errors": [ 14 | { 15 | "code": 21002, 16 | "msg": "Request timed out and will be cancelled" 17 | } 18 | ], 19 | "status": "timeout", 20 | "metrics": { 21 | "elapsedTime": "24.187696ms", 22 | "executionTime": "19.366336ms", 23 | "resultCount": 0, 24 | "resultSize": 0, 25 | "processedObjects": 0, 26 | "errorCount": 1 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/kv/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Holds all classes that are needed for the Couchbase Java SDK. 19 | */ 20 | 21 | /** 22 | * Namespace for various kv-service related classes. 23 | */ 24 | package com.couchbase.client.java.kv; -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/view/ViewOrdering.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.java.view; 17 | 18 | /** 19 | * Sets the ordering of the view result rows. 20 | */ 21 | public enum ViewOrdering { 22 | 23 | ASCENDING, 24 | DESCENDING 25 | 26 | } 27 | -------------------------------------------------------------------------------- /columnar-java-client/src/main/java/com/couchbase/columnar/client/java/json/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Simple classes for manipulating JSON. 19 | */ 20 | @NullMarked 21 | package com.couchbase.columnar.client.java.json; 22 | 23 | import org.jspecify.annotations.NullMarked; 24 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/manager/CoreQueryType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.manager; 18 | 19 | import com.couchbase.client.core.annotation.Stability; 20 | 21 | @Stability.Internal 22 | public enum CoreQueryType { 23 | READ_ONLY, 24 | WRITE 25 | } 26 | -------------------------------------------------------------------------------- /scala-client/src/main/scala-3/com/couchbase/client/scala/env/JavaCoreEnvBuilder.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.scala.env 17 | import com.couchbase.client.core.env.CoreEnvironment.Builder 18 | 19 | private[scala] type JavaCoreEnvBuilder = [SELF <: Builder[SELF]] =>> Builder[SELF] 20 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/codec/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Holds all classes that are needed for the Couchbase Java SDK. 19 | */ 20 | 21 | /** 22 | * Utilities and interfaces for encoding and decoding. 23 | */ 24 | package com.couchbase.client.java.codec; -------------------------------------------------------------------------------- /core-fit-performer/src/main/java/com/couchbase/client/performer/core/bounds/BoundsExecutor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.performer.core.bounds; 17 | 18 | public interface BoundsExecutor { 19 | // Returns whether a command may be executed. 20 | boolean canExecute(); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /scala-fit-performer/src/main/scala/com/couchbase/client/performer/scala/util/SerializableValidation.scala: -------------------------------------------------------------------------------- 1 | package com.couchbase.client.performer.scala.util 2 | 3 | import java.io.{ByteArrayOutputStream, NotSerializableException, ObjectOutputStream} 4 | 5 | object SerializableValidation { 6 | 7 | /** Anything used by the Spark Connector needs to be Serializable */ 8 | def assertIsSerializable(input: Any): Unit = { 9 | try { 10 | val bOutput = new ByteArrayOutputStream(2048) 11 | val objectOutputStream = new ObjectOutputStream(bOutput) 12 | objectOutputStream.writeObject(input) 13 | objectOutputStream.close() 14 | } catch { 15 | case e: NotSerializableException => 16 | throw new RuntimeException( 17 | s"Failed to serialize object. This will cause issues for the Spark Connector such as JVMCBC-1458. Object was ${input}", 18 | e 19 | ) 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /scala-client/src/main/scala/com/couchbase/client/scala/DefaultResources.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.scala 18 | 19 | private[scala] object DefaultResources { 20 | val DefaultScope = "_default" 21 | val DefaultCollection = "_default" 22 | val DefaultCollectionId = 0 23 | } 24 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/view/DesignDocumentNamespace.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.java.view; 18 | 19 | import com.couchbase.client.core.annotation.Stability; 20 | 21 | @Stability.Volatile 22 | public enum DesignDocumentNamespace { 23 | DEVELOPMENT, 24 | PRODUCTION, 25 | } 26 | -------------------------------------------------------------------------------- /columnar-java-client/src/main/java/com/couchbase/columnar/client/java/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Start here by creating a {@link com.couchbase.columnar.client.java.Cluster}. 19 | */ 20 | @NullMarked 21 | package com.couchbase.columnar.client.java; 22 | 23 | import org.jspecify.annotations.NullMarked; 24 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/kv/CoreScanType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.kv; 17 | 18 | 19 | import com.couchbase.client.core.annotation.Stability; 20 | 21 | /** 22 | * Either RangeScan or SampleScan 23 | */ 24 | @Stability.Internal 25 | public interface CoreScanType { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /test-utils/src/main/java/com/couchbase/client/test/ServerVersions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.test; 18 | 19 | public class ServerVersions { 20 | // A regression with views was introduced in 7.1.4 that causes our view tests to regularly fail. 21 | public static final String AVOID_MB_55617 = "7.1.4"; 22 | } 23 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/api/search/CoreHighlightStyle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.api.search; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | 20 | @Stability.Internal 21 | public enum CoreHighlightStyle { 22 | HTML, 23 | ANSI, 24 | SERVER_DEFAULT 25 | } 26 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/api/search/vector/CoreVectorQueryCombination.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.api.search.vector; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | 20 | @Stability.Internal 21 | public enum CoreVectorQueryCombination { 22 | AND, 23 | OR 24 | } 25 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/UnsupportedConfigMechanismException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | import com.couchbase.client.core.annotation.Stability; 20 | 21 | @Stability.Internal 22 | public class UnsupportedConfigMechanismException extends ConfigException { 23 | } 24 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/msg/ScopedRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.msg; 18 | 19 | /** 20 | * @deprecated The "bucket" method is now part of the Request interface, 21 | * so ScopedRequest is no longer needed. 22 | */ 23 | @Deprecated 24 | public interface ScopedRequest { 25 | } 26 | -------------------------------------------------------------------------------- /columnar-java-client/src/main/java/com/couchbase/columnar/client/java/internal/JsonSerializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.columnar.client.java.internal; 18 | 19 | import org.jetbrains.annotations.ApiStatus; 20 | 21 | @ApiStatus.Internal 22 | public interface JsonSerializer { 23 | byte[] serialize(Object input); 24 | } 25 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/AlreadyShutdownException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | /** 20 | * Thrown if a resource is already permanently terminated and tried to be used afterwards. 21 | */ 22 | public class AlreadyShutdownException extends CouchbaseException { 23 | } 24 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/transaction/support/StagedMutationType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.transaction.support; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | 20 | @Stability.Internal 21 | public enum StagedMutationType { 22 | INSERT, 23 | REMOVE, 24 | REPLACE 25 | } 26 | -------------------------------------------------------------------------------- /java-client/src/test/resources/sdk-testcases/query/prepared-statement-4070.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "http_status": 500, 4 | "description": "This case is representative of a response a prepared statement request which has an illegal plan.", 5 | "reproduction": "Send a prepared statement request to the server where the encoded_plan field is illegal.", 6 | "expectation": "When enhanced prepared statements are not in use then retry", 7 | "server_version": "6.0" 8 | }, 9 | "data": { 10 | "requestID": "34fd1715-db11-410e-a058-1f91cc886dfb", 11 | "errors": [ 12 | { 13 | "code": 4070, 14 | "msg": "Unable to decode prepared statement - cause: illegal base64 data at input byte 29" 15 | } 16 | ], 17 | "status": "fatal", 18 | "metrics": { 19 | "elapsedTime": "58.631633ms", 20 | "executionTime": "41.518µs", 21 | "resultCount": 0, 22 | "resultSize": 0, 23 | "errorCount": 1 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/codec/JsonSerializer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.kotlin.codec 18 | 19 | public interface JsonSerializer { 20 | 21 | public fun serialize(value: T, type: TypeRef): ByteArray 22 | 23 | public fun deserialize(json: ByteArray, type: TypeRef): T 24 | 25 | } 26 | -------------------------------------------------------------------------------- /scala-client/src/test/resources/sdk-testcases/query/prepared-statement-4070.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "http_status": 500, 4 | "description": "This case is representative of a response a prepared statement request which has an illegal plan.", 5 | "reproduction": "Send a prepared statement request to the server where the encoded_plan field is illegal.", 6 | "expectation": "When enhanced prepared statements are not in use then retry", 7 | "server_version": "6.0" 8 | }, 9 | "data": { 10 | "requestID": "34fd1715-db11-410e-a058-1f91cc886dfb", 11 | "errors": [ 12 | { 13 | "code": 4070, 14 | "msg": "Unable to decode prepared statement - cause: illegal base64 data at input byte 29" 15 | } 16 | ], 17 | "status": "fatal", 18 | "metrics": { 19 | "elapsedTime": "58.631633ms", 20 | "executionTime": "41.518µs", 21 | "resultCount": 0, 22 | "resultSize": 0, 23 | "errorCount": 1 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /java-client/src/test/resources/sdk-testcases/analytics/syntax-error-24000.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "http_status": 400, 4 | "description": "This case is representative of an analytics query request containing a syntax error.", 5 | "reproduction": "Send an analytics query request to the server containing a statement with a syntax error.", 6 | "server_version": "6.0.1" 7 | }, 8 | "data": { 9 | "requestID":"eb8a8d08-9e25-4473-81f8-6565c51a43d9", 10 | "signature":{ 11 | "*":"*" 12 | }, 13 | "errors":[ 14 | { 15 | "code":24000, 16 | "msg":"Syntax error: In line 1 >>SELECT * FRM `travel-sample`;<< Encountered \"FRM\" at column 10. " 17 | } 18 | ], 19 | "status":"fatal", 20 | "metrics":{ 21 | "elapsedTime":"161.673835ms", 22 | "executionTime":"135.564047ms", 23 | "resultCount":0, 24 | "resultSize":0, 25 | "processedObjects":0, 26 | "errorCount":1 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /scala-client/src/main/scala-2/com/couchbase/client/scala/env/package.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.scala 17 | 18 | import com.couchbase.client.core.env.CoreEnvironment.Builder 19 | 20 | package object env { 21 | private[scala] type JavaCoreEnvBuilder[SELF] = Builder[SELF] forSome { 22 | type SELF <: Builder[SELF] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/msg/UnmonitoredRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.msg; 18 | 19 | /** 20 | * Requests implementing this interface will not be reported in various places. 21 | *

22 | * Since they fly "under the radar", use with care! 23 | */ 24 | public interface UnmonitoredRequest { 25 | } 26 | -------------------------------------------------------------------------------- /scala-client/src/test/resources/sdk-testcases/analytics/syntax-error-24000.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "http_status": 400, 4 | "description": "This case is representative of an analytics query request containing a syntax error.", 5 | "reproduction": "Send an analytics query request to the server containing a statement with a syntax error.", 6 | "server_version": "6.0.1" 7 | }, 8 | "data": { 9 | "requestID":"eb8a8d08-9e25-4473-81f8-6565c51a43d9", 10 | "signature":{ 11 | "*":"*" 12 | }, 13 | "errors":[ 14 | { 15 | "code":24000, 16 | "msg":"Syntax error: In line 1 >>SELECT * FRM `travel-sample`;<< Encountered \"FRM\" at column 10. " 17 | } 18 | ], 19 | "status":"fatal", 20 | "metrics":{ 21 | "elapsedTime":"161.673835ms", 22 | "executionTime":"135.564047ms", 23 | "resultCount":0, 24 | "resultSize":0, 25 | "processedObjects":0, 26 | "errorCount":1 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core-io/src/test/resources/com/couchbase/client/core/config/memcached_with_ipv6.json: -------------------------------------------------------------------------------- 1 | {"rev":23,"name":"cache","uri":"/pools/default/buckets/cache?bucket_uuid=3d182425867483f45fa6feb105661af1","streamingUri":"/pools/default/bucketsStreaming/cache?bucket_uuid=3d182425867483f45fa6feb105661af1","nodes":[{"hostname":"[fd63:6f75:6368:2068:1471:75ff:fe25:a8be]:8091","ports":{"proxy":11211,"direct":11210}},{"hostname":"[fd63:6f75:6368:2068:c490:b5ff:fe86:9cf7]:8091","ports":{"proxy":11211,"direct":11210}}],"nodesExt":[{"services":{"mgmt":8091,"mgmtSSL":18091,"capiSSL":18092,"capi":8092,"kvSSL":11207,"projector":9999,"kv":11210,"moxi":11211},"hostname":"fd63:6f75:6368:2068:1471:75ff:fe25:a8be"},{"services":{"mgmt":8091,"mgmtSSL":18091,"capiSSL":18092,"capi":8092,"kvSSL":11207,"projector":9999,"kv":11210,"moxi":11211},"thisNode":true,"hostname":"fd63:6f75:6368:2068:c490:b5ff:fe86:9cf7"}],"nodeLocator":"ketama","uuid":"3d182425867483f45fa6feb105661af1","bucketCapabilitiesVer":"","bucketCapabilities":["xattr","cbhello","nodesExt"]} -------------------------------------------------------------------------------- /scala-client/src/main/scala-3/com/couchbase/client/scala/Bucket.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.scala 17 | 18 | /** Represents a Couchbase bucket resource. 19 | * 20 | * Applications should not create these manually, but instead use the functions in [[Cluster]]. 21 | */ 22 | class Bucket private[scala] (val async: AsyncBucket) extends BucketBase {} 23 | -------------------------------------------------------------------------------- /scala-client/src/main/scala-2/com/couchbase/client/scala/manager/view/DesignDocument.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.scala.manager.view 17 | 18 | case class DesignDocument(name: String, views: collection.Map[String, View] = Map()) { 19 | def putView(name: String, view: View): DesignDocument = { 20 | copy(views = views + (name -> view)) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /columnar-java-client/src/main/java/com/couchbase/columnar/client/java/codec/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Classes that turn query result rows into Java objects 19 | * when you call {@code row.as(Class)} or {@code row.as(TypeRef)}. 20 | */ 21 | @NullMarked 22 | package com.couchbase.columnar.client.java.codec; 23 | 24 | import org.jspecify.annotations.NullMarked; 25 | -------------------------------------------------------------------------------- /core-io/src/test/java/com/couchbase/client/core/protostellar/util/CoreTestEnvironment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.protostellar.util; 17 | 18 | import com.couchbase.client.core.env.CoreEnvironment; 19 | 20 | public class CoreTestEnvironment extends CoreEnvironment { 21 | public CoreTestEnvironment(Builder builder) { 22 | super(builder); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test-utils/src/main/java/com/couchbase/client/test/Services.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.test; 17 | 18 | public enum Services { 19 | KV, 20 | KV_TLS, 21 | MANAGER, 22 | MANAGER_TLS, 23 | QUERY, 24 | QUERY_TLS, 25 | ANALYTICS, 26 | ANALYTICS_TLS, 27 | SEARCH, 28 | SEARCH_TLS, 29 | VIEW, 30 | VIEW_TLS, 31 | EVENTING, 32 | EVENTING_TLS 33 | } 34 | -------------------------------------------------------------------------------- /kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/analytics/AnalyticsWarning.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.kotlin.analytics 18 | 19 | public class AnalyticsWarning( 20 | public val code: Int, 21 | public val message: String, 22 | ) { 23 | override fun toString(): String { 24 | return "AnalyticsWarning(code=$code, message='$message')" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/api/search/queries/CoreGeoPoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.api.search.queries; 18 | 19 | import com.couchbase.client.core.annotation.Stability; 20 | import com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode; 21 | 22 | @Stability.Internal 23 | public interface CoreGeoPoint { 24 | JsonNode toJson(); 25 | } 26 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/LinkExistsException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | import com.couchbase.client.core.error.context.ErrorContext; 20 | 21 | public class LinkExistsException extends CouchbaseException { 22 | public LinkExistsException(final ErrorContext ctx) { 23 | super("The link already exists", ctx); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/LinkNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | import com.couchbase.client.core.error.context.ErrorContext; 20 | 21 | public class LinkNotFoundException extends CouchbaseException { 22 | public LinkNotFoundException(final ErrorContext ctx) { 23 | super("The link is not found", ctx); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/transaction/getmulti/CoreGetMultiSignal.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.transaction.getmulti; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | 20 | @Stability.Internal 21 | public enum CoreGetMultiSignal { 22 | COMPLETED, 23 | RETRY, 24 | RESET_AND_RETRY, 25 | CONTINUE, 26 | BOUND_EXCEEDED 27 | } 28 | 29 | -------------------------------------------------------------------------------- /scala-client/src/main/java/com/couchbase/client/scala/internal/JavadocPlaceholder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.scala.internal; 18 | 19 | /** 20 | * Empty API docs are generated for the Scala 3 build at this time, due to known incompatibilies between Maven and Scala 3: 21 | * https://github.com/davidB/scala-maven-plugin/issues/862 22 | */ 23 | @Deprecated 24 | class JavadocPlaceholder { 25 | } 26 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/cnc/metrics/NoopCounter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.cnc.metrics; 18 | 19 | import com.couchbase.client.core.cnc.Counter; 20 | 21 | public class NoopCounter implements Counter { 22 | 23 | public static final NoopCounter INSTANCE = new NoopCounter(); 24 | 25 | @Override 26 | public void incrementBy(long number) { 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/json/JsonNull.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.java.json; 17 | 18 | /** 19 | * Represents the JSON form of "NULL". 20 | * 21 | * @author Michael Nitschinger 22 | * @since 2.0 23 | */ 24 | public class JsonNull extends JsonValue { 25 | 26 | public static final JsonNull INSTANCE = new JsonNull(); 27 | 28 | private JsonNull() {} 29 | 30 | } 31 | -------------------------------------------------------------------------------- /java-client/src/test/java/com/couchbase/client/java/codec/DefaultJsonSerializerTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.java.codec; 18 | 19 | class DefaultJsonSerializerTest extends JsonSerializerTestBase { 20 | private static final JsonSerializer serializer = DefaultJsonSerializer.create(); 21 | 22 | @Override 23 | protected JsonSerializer serializer() { 24 | return serializer; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /scala-implicits/src/main/java/com/couchbase/client/scala/internal/JavadocPlaceholder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.scala.internal; 18 | 19 | /** 20 | * Empty API docs are generated for the Scala 3 build at this time, due to known incompatibilies between Maven and Scala 3: 21 | * https://github.com/davidB/scala-maven-plugin/issues/862 22 | */ 23 | @Deprecated 24 | class JavadocPlaceholder { 25 | } 26 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/api/manager/CoreCreateQueryIndexOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.api.manager; 18 | 19 | import com.couchbase.client.core.annotation.Stability; 20 | 21 | /** 22 | * Allows customizing how a query index is created. 23 | */ 24 | @Stability.Internal 25 | public interface CoreCreateQueryIndexOptions extends CoreCreateQueryIndexSharedOptions { 26 | } 27 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/api/search/result/CoreSearchFacetResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.api.search.result; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | 20 | @Stability.Internal 21 | public interface CoreSearchFacetResult { 22 | String name(); 23 | String field(); 24 | long total(); 25 | long missing(); 26 | long other(); 27 | } 28 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/NoAccessDuringConfigLoadException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | import com.couchbase.client.core.annotation.Stability; 20 | 21 | @Stability.Internal 22 | public class NoAccessDuringConfigLoadException extends ConfigException { 23 | public NoAccessDuringConfigLoadException(String message) { 24 | super(message); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/transaction/getmulti/CoreTransactionGetMultiMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.transaction.getmulti; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | 20 | @Stability.Internal 21 | public enum CoreTransactionGetMultiMode { 22 | PRIORITISE_LATENCY, 23 | DISABLE_READ_SKEW_DETECTION, 24 | PRIORITISE_READ_SKEW_DETECTION 25 | } 26 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | updates: 4 | - package-ecosystem: "maven" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | allow: 9 | - dependency-name: "io.netty:*" 10 | - dependency-name: "com.fasterxml.jackson.core:*" 11 | - dependency-name: "com.fasterxml.jackson.module:*" 12 | ignore: 13 | # Allow only patch updates for Netty 14 | - dependency-name: "io.netty:*" 15 | update-types: 16 | - version-update:semver-major 17 | - version-update:semver-minor 18 | - package-ecosystem: "maven" 19 | directory: "/core-io-deps" 20 | schedule: 21 | interval: "daily" 22 | allow: 23 | - dependency-name: "io.netty:*" 24 | - dependency-name: "com.fasterxml.jackson.core:*" 25 | - dependency-name: "com.fasterxml.jackson.module:*" 26 | ignore: 27 | # Allow only patch updates for Netty 28 | - dependency-name: "io.netty:*" 29 | update-types: 30 | - version-update:semver-major 31 | - version-update:semver-minor 32 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/manager/bucket/CoreCreateBucketSettings.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.manager.bucket; 18 | 19 | import com.couchbase.client.core.annotation.Stability; 20 | import reactor.util.annotation.Nullable; 21 | 22 | @Stability.Internal 23 | public interface CoreCreateBucketSettings { 24 | @Nullable 25 | CoreConflictResolutionType conflictResolutionType(); 26 | } 27 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/cnc/apptelemetry/collector/Reportable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.cnc.apptelemetry.collector; 18 | 19 | import java.util.Map; 20 | import java.util.function.Consumer; 21 | 22 | interface Reportable { 23 | void reportTo( 24 | Consumer charSink, 25 | Map commonTags, 26 | long currentTimeMillis 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/DatasetExistsException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | import com.couchbase.client.core.error.context.ErrorContext; 20 | 21 | public class DatasetExistsException extends CouchbaseException { 22 | 23 | public DatasetExistsException(final ErrorContext ctx) { 24 | super("The analytics dataset already exists", ctx); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/TooManyInstancesException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | /** 20 | * Raised if more SDK instances are created than allowed in configuration. 21 | */ 22 | public class TooManyInstancesException extends CouchbaseException { 23 | 24 | public TooManyInstancesException(final String message) { 25 | super(message); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/transaction/getmulti/CoreGetMultiPhase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.transaction.getmulti; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | 20 | @Stability.Internal 21 | public enum CoreGetMultiPhase { 22 | FIRST_DOC_FETCH, 23 | SUBSEQUENT_TO_FIRST_DOC_FETCH, 24 | DISCOVERED_DOCS_IN_T1, 25 | RESOLVING_T1_ATR_ENTRY_MISSING 26 | } 27 | -------------------------------------------------------------------------------- /java-client/src/test/resources/sdk-testcases/query/enhanced-prepared-4040.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "http_status": 404, 4 | "description": "This case is representative of a response an enhanced prepared statement request which has an unknown plan.", 5 | "reproduction": "Send a enhanced prepared statement request to the server where the uuid in the prepared field is unknown to the server.", 6 | "expectation": "When enhanced prepared statements are in use then retry", 7 | "server_version": "6.5" 8 | }, 9 | "data": { 10 | "requestID": "9605e383-3da3-440e-a4e1-47d4b673401f", 11 | "clientContextID": "d4c97655-2e89-41ed-a46c-9f4e2a1eae5a", 12 | "errors": [ 13 | { 14 | "code": 4040, 15 | "msg": "No such prepared statement: 32f2405d-5715-5915-b2b2-d2c557da49" 16 | } 17 | ], 18 | "status": "fatal", 19 | "metrics": { 20 | "elapsedTime": "1.167435ms", 21 | "executionTime": "1.117429ms", 22 | "resultCount": 0, 23 | "resultSize": 0, 24 | "errorCount": 1 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /scala-client/src/test/resources/sdk-testcases/query/enhanced-prepared-4040.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "http_status": 404, 4 | "description": "This case is representative of a response an enhanced prepared statement request which has an unknown plan.", 5 | "reproduction": "Send a enhanced prepared statement request to the server where the uuid in the prepared field is unknown to the server.", 6 | "expectation": "When enhanced prepared statements are in use then retry", 7 | "server_version": "6.5" 8 | }, 9 | "data": { 10 | "requestID": "9605e383-3da3-440e-a4e1-47d4b673401f", 11 | "clientContextID": "d4c97655-2e89-41ed-a46c-9f4e2a1eae5a", 12 | "errors": [ 13 | { 14 | "code": 4040, 15 | "msg": "No such prepared statement: 32f2405d-5715-5915-b2b2-d2c557da49" 16 | } 17 | ], 18 | "status": "fatal", 19 | "metrics": { 20 | "elapsedTime": "1.167435ms", 21 | "executionTime": "1.117429ms", 22 | "resultCount": 0, 23 | "resultSize": 0, 24 | "errorCount": 1 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/api/search/CoreSearchScanConsistency.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.api.search; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | 20 | @Stability.Internal 21 | public enum CoreSearchScanConsistency { 22 | NOT_BOUNDED { 23 | @Override 24 | public String toString() { 25 | return ""; 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/DataverseExistsException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | import com.couchbase.client.core.error.context.ErrorContext; 20 | 21 | public class DataverseExistsException extends CouchbaseException { 22 | 23 | public DataverseExistsException(final ErrorContext ctx) { 24 | super("The analytics dataverse already exists", ctx); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/ViewNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | import com.couchbase.client.core.error.context.ErrorContext; 20 | 21 | public class ViewNotFoundException extends CouchbaseException { 22 | 23 | public ViewNotFoundException(ErrorContext ctx) { 24 | super("The queried view is not found on the server", ctx); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/manager/eventing/EventingFunctionBucketAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.java.manager.eventing; 18 | 19 | /** 20 | * The bucket access policy for the bucket binding. 21 | */ 22 | public enum EventingFunctionBucketAccess { 23 | /** 24 | * Read-only access. 25 | */ 26 | READ_ONLY, 27 | /** 28 | * Read and write access. 29 | */ 30 | READ_WRITE 31 | } 32 | -------------------------------------------------------------------------------- /columnar-java-fit-performer/src/main/java/com/couchbase/columnar/modes/Mode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.columnar.modes; 18 | 19 | public enum Mode { 20 | /** 21 | * The executeQuery() variant that has a row callback and returns QueryMetadata. 22 | */ 23 | PUSH_BASED_STREAMING, 24 | 25 | /** 26 | * The executeQuery() variant that returns a QueryResult with all rows buffered. 27 | */ 28 | BUFFERED 29 | } 30 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/compression/snappy/repackaged/org/iq80/snappy/v04/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * These classes came from https://github.com/dain/snappy/ at tag "snappy-0.4". 19 | *

20 | * They have been modified to always use "SlowMemory" instead of "UnsafeMemory", 21 | * to avoid CVE-2024-36124. 22 | */ 23 | package com.couchbase.client.core.compression.snappy.repackaged.org.iq80.snappy.v04; 24 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/DataverseNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | import com.couchbase.client.core.error.context.ErrorContext; 20 | 21 | public class DataverseNotFoundException extends CouchbaseException { 22 | 23 | public DataverseNotFoundException(final ErrorContext ctx) { 24 | super("The analytics dataverse is not found", ctx); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/env/ClusterPropertyLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.java.env; 18 | 19 | import com.couchbase.client.core.env.PropertyLoader; 20 | 21 | /** 22 | * Marker interface for additional properties that can be loaded via the cluster environment builder. 23 | */ 24 | public interface ClusterPropertyLoader extends PropertyLoader { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /columnar-java-client/src/main/java/com/couchbase/columnar/client/java/internal/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Classes in this package are not part of the SDK's public API, 19 | * and may change in any way at any time. 20 | */ 21 | @ApiStatus.Internal 22 | @NullMarked 23 | package com.couchbase.columnar.client.java.internal; 24 | 25 | import org.jetbrains.annotations.ApiStatus; 26 | import org.jspecify.annotations.NullMarked; 27 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/config/ConfigRefreshFailure.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.config; 18 | 19 | import com.couchbase.client.core.annotation.Stability; 20 | 21 | @Stability.Internal 22 | public enum ConfigRefreshFailure { 23 | 24 | /** 25 | * All eligible nodes have been tried when refreshing but no config was loaded. 26 | */ 27 | ALL_NODES_TRIED_ONCE_WITHOUT_SUCCESS 28 | 29 | } 30 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/transaction/internal/ForwardCompatibilityRequiresRetryException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.error.transaction.internal; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | import com.couchbase.client.core.error.CouchbaseException; 20 | 21 | @Stability.Internal 22 | public class ForwardCompatibilityRequiresRetryException extends CouchbaseException { 23 | } 24 | -------------------------------------------------------------------------------- /java-fit-performer/src/main/java/com/couchbase/twoway/TestFailure.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.twoway; 17 | 18 | public class TestFailure extends RuntimeException { 19 | public TestFailure(String err) { 20 | super(err); 21 | } 22 | 23 | public TestFailure(String err, Throwable cause) { 24 | super(err, cause); 25 | } 26 | 27 | public TestFailure(Throwable cause) { 28 | super(cause); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/cnc/metrics/NoopValueRecorder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.cnc.metrics; 18 | 19 | import com.couchbase.client.core.cnc.ValueRecorder; 20 | 21 | public class NoopValueRecorder implements ValueRecorder { 22 | 23 | public static final NoopValueRecorder INSTANCE = new NoopValueRecorder(); 24 | 25 | @Override 26 | public void recordValue(long value) { 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/msg/TargetedRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.msg; 18 | 19 | /** 20 | * Marker interface to signal a request that can only be sent to the specified target node. 21 | * @deprecated the "target" method is now part of the Request interface, 22 | * so the TargetedRequest interface is no longer necessary. 23 | */ 24 | @Deprecated 25 | public interface TargetedRequest { 26 | } 27 | -------------------------------------------------------------------------------- /columnar-fit-performer-shared/src/main/java/com/couchbase/columnar/fit/core/util/StartTimes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.columnar.fit.core.util; 17 | 18 | import static com.couchbase.columnar.fit.core.util.TimeUtil.getTimeNow; 19 | 20 | public record StartTimes(long asSystem, com.google.protobuf.Timestamp asWallclock) { 21 | public static StartTimes startTiming() { 22 | return new StartTimes(System.nanoTime(), getTimeNow()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/env/RequestCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.env; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | import com.couchbase.client.core.msg.Request; 20 | 21 | import java.util.function.Consumer; 22 | 23 | /** 24 | * Marker interface for different callbacks in the request lifecycle. 25 | */ 26 | @Stability.Internal 27 | public interface RequestCallback { 28 | } 29 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/SeedNodeOutdatedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | /** 20 | * Used to signal that the seed node used for an operation is outdated and might need to be refreshed. 21 | */ 22 | public class SeedNodeOutdatedException extends ConfigException { 23 | 24 | public SeedNodeOutdatedException(final String message) { 25 | super(message); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /columnar-java-client/examples/maven-project-template/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | wrapperVersion=3.3.2 18 | distributionType=only-script 19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip 20 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/api/search/facet/CoreTermFacet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.api.search.facet; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | import reactor.util.annotation.Nullable; 20 | 21 | @Stability.Internal 22 | public class CoreTermFacet extends CoreSearchFacet { 23 | 24 | public CoreTermFacet(String field, @Nullable Integer limit) { 25 | super(field, limit); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip 18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 19 | -------------------------------------------------------------------------------- /columnar-java-fit-performer/src/main/java/com/couchbase/columnar/query/ExecuteQueryStreamer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.columnar.query; 18 | 19 | public interface ExecuteQueryStreamer { 20 | fit.columnar.EmptyResultOrFailureResponse blockForQueryResult(); 21 | 22 | fit.columnar.QueryRowResponse blockForRow(); 23 | 24 | fit.columnar.QueryResultMetadataResponse blockForMetadata(); 25 | 26 | void cancel(); 27 | 28 | String queryHandle(); 29 | } 30 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/transaction/internal/RetryOperationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.error.transaction.internal; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | import com.couchbase.client.core.error.CouchbaseException; 20 | 21 | /** 22 | * Indicates that this operation should be retried. 23 | */ 24 | @Stability.Internal 25 | public class RetryOperationException extends CouchbaseException {} 26 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/encryption/databind/jackson/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Support for encryption during Jackson data binding, compatible with 19 | * the standard Jackson library. 20 | * 21 | * @implNote Please keep these classes in sync with their repackaged counterparts 22 | * in {@link com.couchbase.client.java.encryption.databind.jackson.repackaged} 23 | */ 24 | package com.couchbase.client.java.encryption.databind.jackson; 25 | -------------------------------------------------------------------------------- /kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/manager/view/View.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.kotlin.manager.view 18 | 19 | import com.couchbase.client.core.logging.RedactableArgument.redactMeta 20 | 21 | public class View( 22 | public val map: String, 23 | public val reduce: String? = null, 24 | ) { 25 | override fun toString(): String { 26 | return "View(map='${redactMeta(map)}', reduce=${redactMeta(reduce)})" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/GlobalConfigNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | /** 20 | * Exception thrown if global configs are supported but the server tells the client that there is currently 21 | * non available. 22 | */ 23 | public class GlobalConfigNotFoundException extends ConfigException { 24 | 25 | public GlobalConfigNotFoundException() { 26 | super(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/transaction/TransactionAlreadyAbortedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.error.transaction; 17 | 18 | import com.couchbase.client.core.error.CouchbaseException; 19 | 20 | public class TransactionAlreadyAbortedException extends CouchbaseException { 21 | public TransactionAlreadyAbortedException() { 22 | super("An operation cannot proceed as the transaction has already aborted"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/transaction/internal/RetryAtrCommitException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.error.transaction.internal; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | import com.couchbase.client.core.error.CouchbaseException; 20 | 21 | /** 22 | * Indicates that committing the ATR entry should be retried. 23 | */ 24 | @Stability.Internal 25 | public class RetryAtrCommitException extends CouchbaseException {} 26 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/transaction/TransactionAlreadyCommittedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.error.transaction; 17 | 18 | import com.couchbase.client.core.error.CouchbaseException; 19 | 20 | public class TransactionAlreadyCommittedException extends CouchbaseException { 21 | public TransactionAlreadyCommittedException() { 22 | super("An operation cannot proceed as the transaction has already committed"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/kv/ExistsResult.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.kotlin.kv 18 | 19 | public class ExistsResult internal constructor( 20 | public val exists: Boolean, 21 | public val cas: Long, 22 | ) { 23 | override fun toString(): String { 24 | return "ExistsResult(exists=$exists, cas=$cas)" 25 | } 26 | 27 | internal companion object { 28 | val NotFound = ExistsResult(false, 0) 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /scala-client/src/main/scala-2/com/couchbase/client/scala/manager/analytics/AnalyticsIndex.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.scala.manager.analytics 18 | import com.couchbase.client.scala.implicits.Codec 19 | 20 | case class AnalyticsIndex( 21 | name: String, 22 | datasetName: String, 23 | dataverseName: String, 24 | isPrimary: Boolean 25 | ) 26 | 27 | object AnalyticsIndex { 28 | implicit val codec: Codec[AnalyticsIndex] = Codec.codec[AnalyticsIndex] 29 | } 30 | -------------------------------------------------------------------------------- /scala-fit-performer/src/main/scala/com/couchbase/client/performer/scala/transaction/TestFailureRaiseFailedPrecondition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.performer.scala.transaction; 17 | 18 | /** 19 | * Signals that the performer should fail the RPC with gRPC FAILED_PRECONDITION. 20 | */ 21 | public class TestFailureRaiseFailedPrecondition extends TestFailure { 22 | public TestFailureRaiseFailedPrecondition(String message) { 23 | super(message); 24 | } 25 | } 26 | 27 | 28 | -------------------------------------------------------------------------------- /core-fit-performer/src/main/java/com/couchbase/client/performer/core/util/TimeUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.performer.core.util; 17 | 18 | import com.google.protobuf.Timestamp; 19 | 20 | public class TimeUtil { 21 | public static Timestamp getTimeNow() { 22 | long millis = System.currentTimeMillis(); 23 | 24 | return Timestamp.newBuilder().setSeconds(millis / 1000) 25 | .setNanos((int) ((millis % 1000) * 1000000)).build(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/MutationTokenOutdatedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.error; 17 | 18 | import com.couchbase.client.core.error.context.ErrorContext; 19 | 20 | public class MutationTokenOutdatedException extends CouchbaseException { 21 | 22 | public MutationTokenOutdatedException(final ErrorContext ctx) { 23 | super("The provided MutationToken is outdated compared to the current state of the server.", ctx); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/msg/kv/NoopResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.msg.kv; 18 | 19 | import com.couchbase.client.core.msg.BaseResponse; 20 | import com.couchbase.client.core.msg.ResponseStatus; 21 | 22 | /** 23 | * The response of a {@link NoopRequest}. 24 | * 25 | * @since 2.0.0 26 | */ 27 | public class NoopResponse extends BaseResponse { 28 | 29 | NoopResponse(ResponseStatus status) { 30 | super(status); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/transaction/components/OperationTypes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.transaction.components; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | 20 | @Stability.Internal 21 | public class OperationTypes { 22 | private OperationTypes() {} 23 | 24 | public static final String INSERT = "insert"; 25 | public static final String REPLACE = "replace"; 26 | public static final String REMOVE = "remove"; 27 | } 28 | -------------------------------------------------------------------------------- /columnar-fit-performer-shared/src/main/java/com/couchbase/columnar/fit/core/util/TimeUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.columnar.fit.core.util; 17 | 18 | import java.time.Instant; 19 | 20 | public class TimeUtil { 21 | public static com.google.protobuf.Timestamp getTimeNow() { 22 | Instant now = Instant.now(); 23 | 24 | return com.google.protobuf.Timestamp.newBuilder() 25 | .setSeconds(now.getEpochSecond()) 26 | .setNanos(now.getNano()) 27 | .build(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/search/HighlightStyle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.java.search; 17 | 18 | import com.couchbase.client.core.annotation.Stability; 19 | 20 | /** 21 | * Enumeration of the highlighting styles recognized by the FTS engine. 22 | * 23 | * @author Simon Baslé 24 | * @author Michael Nitschinger 25 | * @since 2.3.0 26 | */ 27 | @Stability.Volatile 28 | public enum HighlightStyle { 29 | HTML, 30 | ANSI, 31 | SERVER_DEFAULT 32 | } 33 | -------------------------------------------------------------------------------- /scala-client/src/main/scala/com/couchbase/client/scala/search/HighlightStyle.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.scala.search 18 | 19 | /** Enumeration of the highlighting styles recognized by the FTS engine. 20 | * 21 | * @since 1.0.0 22 | */ 23 | sealed trait HighlightStyle 24 | 25 | object HighlightStyle { 26 | case object HTML extends HighlightStyle 27 | case object ANSI extends HighlightStyle 28 | case object ServerDefault extends HighlightStyle 29 | } 30 | -------------------------------------------------------------------------------- /scala-fit-performer/src/main/scala/com/couchbase/client/performer/scala/transaction/TestFailure.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.performer.scala.transaction; 17 | 18 | public class TestFailure extends RuntimeException { 19 | public TestFailure(String err) { 20 | super(err); 21 | } 22 | 23 | public TestFailure(String err, Throwable cause) { 24 | super(err, cause); 25 | } 26 | 27 | public TestFailure(Throwable cause) { 28 | super(cause); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/cnc/ValueRecorder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.cnc; 18 | 19 | import com.couchbase.client.core.annotation.Stability; 20 | 21 | /** 22 | * Represents a generic value recorder for the metrics interface. 23 | */ 24 | @Stability.Volatile 25 | public interface ValueRecorder { 26 | 27 | /** 28 | * Records a specific value. 29 | * 30 | * @param value the value to record. 31 | */ 32 | void recordValue(long value); 33 | } 34 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/EventingFunctionNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.error; 18 | 19 | import com.couchbase.client.core.error.context.ErrorContext; 20 | 21 | /** 22 | * Raised if the eventing function is not found. 23 | */ 24 | public class EventingFunctionNotFoundException extends CouchbaseException { 25 | 26 | public EventingFunctionNotFoundException(String message, ErrorContext ctx) { 27 | super(message, ctx); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/io/netty/HttpChannelContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.io.netty; 18 | 19 | import com.couchbase.client.core.deps.io.netty.channel.ChannelId; 20 | 21 | public class HttpChannelContext { 22 | 23 | private final ChannelId channelId; 24 | 25 | public HttpChannelContext(final ChannelId channelId) { 26 | this.channelId = channelId; 27 | } 28 | 29 | public ChannelId channelId() { 30 | return channelId; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/error/JobQueueFullException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.core.error; 17 | 18 | import com.couchbase.client.core.error.context.ErrorContext; 19 | 20 | /** 21 | * Indicates the analytics server job queue is full 22 | * 23 | * @since 3.0 24 | */ 25 | public class JobQueueFullException extends CouchbaseException { 26 | 27 | public JobQueueFullException(final ErrorContext ctx) { 28 | super("Server job queue is full", ctx); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/batch/BatchHelperFailureException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.java.batch; 18 | 19 | import com.couchbase.client.core.error.CouchbaseException; 20 | import com.couchbase.client.core.error.context.ErrorContext; 21 | 22 | public class BatchHelperFailureException extends CouchbaseException { 23 | 24 | public BatchHelperFailureException(String message, Throwable cause, ErrorContext ctx) { 25 | super(message, cause, ctx); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/encryption/databind/jackson/repackaged/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Support for encryption during Jackson data binding, compatible with 19 | * the repackaged version of Jackson included in the SDK. 20 | * 21 | * @implNote Please keep these classes in sync with their non-repackaged counterparts 22 | * in {@link com.couchbase.client.java.encryption.databind.jackson} 23 | */ 24 | package com.couchbase.client.java.encryption.databind.jackson.repackaged; 25 | -------------------------------------------------------------------------------- /java-client/src/main/java/com/couchbase/client/java/manager/eventing/EventingFunctionUrlNoAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.java.manager.eventing; 18 | 19 | /** 20 | * No authentication for a URL binding is used. 21 | *

22 | * Created through {@link EventingFunctionUrlAuth#noAuth()}. 23 | */ 24 | public class EventingFunctionUrlNoAuth extends EventingFunctionUrlAuth { 25 | 26 | @Override 27 | public String toString() { 28 | return "EventingFunctionUrlNoAuth"; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /scala-client/src/main/scala/com/couchbase/client/scala/env/PasswordAuthenticator.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.scala.env 17 | 18 | import com.couchbase.client.core.env.{Authenticator, AuthenticatorWrapper} 19 | 20 | case class PasswordAuthenticator(username: String, password: String) extends AuthenticatorWrapper { 21 | 22 | private val inner = com.couchbase.client.core.env.PasswordAuthenticator.create(username, password) 23 | 24 | override protected def wrapped(): Authenticator = inner 25 | } 26 | -------------------------------------------------------------------------------- /test-utils/src/main/java/com/couchbase/client/test/IgnoreWhenContainer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.couchbase.client.test; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | @Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.TYPE }) 24 | @Retention(RetentionPolicy.RUNTIME) 25 | public @interface IgnoreWhenContainer { 26 | IgnoreWhen[] value(); 27 | } 28 | -------------------------------------------------------------------------------- /columnar-java-client/src/main/java/com/couchbase/columnar/client/java/InvalidCredentialException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.columnar.client.java; 18 | 19 | import com.couchbase.client.core.cnc.Context; 20 | import com.couchbase.client.core.error.context.ErrorContext; 21 | 22 | public class InvalidCredentialException extends ColumnarException { 23 | InvalidCredentialException(ErrorContext ctx) { 24 | super("User authentication failed. " + ctx.exportAsString(Context.ExportFormat.JSON)); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core-io/src/main/java/com/couchbase/client/core/cnc/Counter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Couchbase, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.couchbase.client.core.cnc; 18 | 19 | import com.couchbase.client.core.annotation.Stability; 20 | 21 | /** 22 | * Represents a generic Counter interface for metrics. 23 | */ 24 | @Stability.Volatile 25 | public interface Counter { 26 | 27 | /** 28 | * Increments the counter by the given number. 29 | * @param number the number to increment the counter by. 30 | */ 31 | void incrementBy(long number); 32 | 33 | } 34 | --------------------------------------------------------------------------------