-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to LiteDB5.0 #61
base: master
Are you sure you want to change the base?
Conversation
Hi there @humhei thanks a lot for the PRs, I will be reviewing/merging them soon so we can get a new version 😄 |
Since fullsearch is usefull when query with |
This PR should not be merged |
Hi @humhei I have merged in all your PRs and published the library as of v2.16 and simplified the repository structure a lot! Before rewriting the code for the LiteDB 5 upgrade, I think we should discuss how the next version v3 should look like. I see that LiteDB v5 supports a SQL-like language which may return different shapes and values than the predefined collection types so in v3 I am thinking of maybe removing the automatic serialization/deserialization altogether and building a new conversion model similar to Thoth.Json |
Sorry, i didn't understand this line well As far as i know |
I am not familiar with |
Well say you have a document that looks like this
and you have a type in F# type Person = { id: int; name: string; age: int } Now you query the "persons" collection and only return
The result would be that each document has the shape
and this BsonDocument cannot be deserialized into Meaning that each query results in a new projection that doesn't necessarily look like the original type which is why I am proposing to have a mechanism to deserialize the documents using |
Thanks for the explanation, It's awesome!
type Person = { id: int; name: string; age: int }
In my option(may be immature) We can consider We can using an expression Some addition info on how LiteDB deal with it(it use an
|
@Zaid-Ajaj if it helps I think having no reflection in serialization/deserialization path might help with perf. Also I feel like explicit conversion is less "magical" which for me is a good thing.
|
@twop Serialization/Deserialization is actually plenty fast but my problem is the fact that we use record types to define shapes both for reading and writing where in reality writing might be a subset (i.e. without ID) and reading might be a superset (i.e. fetching from multiple collections) |
All tests will be passed, After a bug of LiteDB being fixed
Linq.fs
, This is not related to this repoRemove fullserach as this is not recommanded in LiteDB5.0