Skip to content

Conversation

jeffdgr8
Copy link

@jeffdgr8 jeffdgr8 commented Oct 9, 2025

May I request to add this private C API CBLDocument_Exists for the CBLDocument.exists() C++ API? This would be helpful testing my Kotlin Multiplatform library for the Linux and Windows platforms that use the C SDK, as there are tests that use this internal Document.exists() API and Kotlin Native can only interop with C, and not C++ directly.

This would be helpful in an upcoming 3.2 release as well as future releases, assuming the Document.exists() API is still used in tests.

(I had a hack to find the c4doc by memory offset in 3.1, but this is extremely fragile and broke with 3.2.)

Past conversation on this topic

Copy link
Contributor

@pasin pasin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a problem adding the function as a private API. Can you also add the function to the exported symbol file?

https://github.com/couchbase/couchbase-lite-C/blob/master/src/exports/CBL_Exports.txt

Please make sure to run the [generate_exports.sh](

https://github.com/couchbase/couchbase-lite-C/blob/master/src/exports/generate_exports.sh) script to regenerate the public symbols and add them to the commit.

(Those links are to the file in the master branch; there should be the exact same files in release/3.2 branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants