This repository was archived by the owner on Jan 29, 2026. It is now read-only.
updated for Crystal 0.35.1#12
Open
vectorselector wants to merge 27 commits intoTechMagister:masterfrom
Open
Conversation
added extra method to be able to create document with custom (externally generated) ID. create_document_custom_id(database, object, id)
updated to work with crystal 0.35.1
Error: no overload matches 'Int32.to_json' with type JSON::Builder ... IDK...
fine, just waste space then..
Deprecated JSON.mapping. use JSON::Serializable instead
"sort" takes an array of EITHER a String or an object as such [{"fieldname1": "desc"}, {"fieldname2": "asc"}] per CouchDB docs
https://docs.couchdb.org/en/2.3.1/api/database/find.html#sort-syntax
added example
oops. version needs to match release
crystal 1.0.0 update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, I updated this shard for Crystal 0.35.1
Basically, the JSON.mapping is out, and it's now just extending each class with JSON::Serializable
I added one more method for creating a document with a custom (out of band) ID, which I need for my work:
I confess to not having added a unit test for this method, which I will do at some point.