Releases: Romitou/MongoSK
🍃 New features!
Finally we come to an update with some new features!
Right away, recap:
🐛 Bugs
- Fix syntaxes typos (
[a [new]]
->[[a] new]
) (477d76e) - Make Skript dependent instead of softdependent (should fix some issues on some MC hosting providers) (cf0f385)
✨ Features
- Introducing array support in joined filters expression (ebf2dc7)
- Introducing Mongo collection creation (4ca89cc)
- Introducing Mongo database and collection drops (ee18121)
- Allow use of raw BSON documents (f7c37fd), i.e. :
{
"foo": {
"bar": true
},
"array": [
{
"test": false
}
]
}
set {_doc} to a new mongo document
set mongo json of {_doc} to "{""foo"":{""bar"":true},""array"":[{""test"":false}]}"
set {_fooDoc} to mongo value "foo" of {_doc} # {_fooDoc} = {"bar":true}
set {_bar} to mongo value "bar" of {_fooDoc} # {_bar} = true
set {_array::*} to mongo list "array" of {_doc}
set {_first} to {_array::1} # {_array::1} = {"test":false}
set {_test} to mongo value "test" of {_first} # {_test} = false
- Introducing Mongo commands! (0a23b45), i.e. :
on script load:
set {server} to mongo server with connection string "mongodb://127.0.0.1"
set {database} to mongo database named "mongosk" of {server}
function getClusterVersion() :: string:
set {_docs::*} to results of mongo command "{ ""serverStatus"": 1 }" in database {database}
set {_doc} to {_docs::1}
# or directly:
set {_doc} to first element of results of mongo command "{ ""serverStatus"": 1 }" in database {database}
# return the mongo value "version" of the returned document:
set {_version} to mongo value "version" of {_doc}
return {_version}
on mongo command start:
broadcast "Mongo command %event-mongodocument% in collection named %event-string% started!"
on mongo command success:
broadcast "Mongo command %event-mongodocument% succedeed in %event-number% ms!"
on mongo command fail:
broadcast "A Mongo command failed with error: %event-string% (took %event-number% ms)!"
That's it for today. And that's not bad.
Thanks to you for your feedback! As always, don't hesitate to contact me if you have any problem.
🍃 Important bug fixes
This new update brings many fixes. This one doesn't bring any additional big feature, because like the previous one, I prefer to concentrate on the bugs to be solved. But don't worry, some new features are still being developed in parallel! 👀
🐛 Bugs
- Better error catching (6018854)
- Fix some errors on the mongo document field expression (53c2b7e)
- Fix issues with mongo document lists (e6c3767)
- Fix not recognised syntaxes when using numbers (fe23964)
- Fix incorrect query time display (72910d0)
- Fix error with empty value filters, like
mongosk filter where filter "foo" is set
(2fb5cfd) - Fix entity codec (ec80be3)
- Fix documentations with invalid examples (e215234)
✨ Features
- You can now delete documents without having to specify a filter, as MongoSK will set an empty filter by default if you do not specify one. The same goes for defining documents (9258c56)
As always, if you have any suggestions, problems or need help, I am always available to help you!
🍃 Some bug fixes
Thank you all for your feedback on MongoSK 2.0.0. Thanks to you, some issues have been solved. Let's review them:
🐛 Bugs
- Mongo document lists not being deserialized (da35afd)
- Fixing some codecs (047ca24, 926af9c, 9f2c299, 70da0a1)
- Severe error when a field is not present in a document (925dab1)
For this update, no additions have been made, while we receive feedback on the stability of this first v2 version. New features will be added soon.
🍃 First 2.0.0 release
As expected and planned for some time, here it is at last! MongoSK v2 makes place. On the program:
-
⚡️ Database queries are executed asynchronously
The code has been rewritten using the mongodb-driver-reactivestreams library -
⚙️ Automatic and intelligent transformation of all sorts of data
You can now store all types of Skript as items, players, blocks, etc. MongoSK does the job for you! -
🔊 Simple and understandable debugging to quickly identify problems
The information are relevant and useful for both novice users and developers of the plugin -
🔬 Addition of advanced queries for specific queries
You are now able to target more precise data in your queries with a lot of options -
🤙 More logical and smart syntaxes
Syntaxes have been reworked to be more consistent and logical
🤔 So, how to update from MongoSK 1 to MongoSK 2?
All information is available on a specially created discussion here: #23. If you still need help, you can come to the Discord server or ask for help in GitHub discussions. All links are on the main page.
🍃 Bug fixes and preparation for 2.0.0
⚠️ Important
The support of the MongoSK 1 versions will be dropped at March 31, 2021. A new version (2.0.0) is being prepared and a stable version will be released in a few days. You can find out more here. This version is thus the last one for MongoSK v1!
This update follows the buggy changes of the previous version, hoping to have solved them. Nevertheless, I strongly recommend that you upgrade to 2.0.0 now.
- ✏️ Fix ambiguous patterns (2e08236)
- 🐛 Fix possibly error when loading MongoSK (3e803a0)
- 🚸 Informing users about the end of support (845fb34)
- 🐛 Fixed unsupported operations (845fb34, thanks @Olyno !)
Some changes here may have broken some things. If this is the case, please let me know before the end of support for this version!
🍃 Introducing Mongo filters
As expected, here is a small update bringing a new feature.
- ✨ Introducing Mongo filters (8555746 - #13). For example, you will now be able to do this:
set {_doc} to first document where "coins" is greater than or equal to 10 in {collection}
, or alsoset {_filter} to new mongo filter where "rank" is "admin"
thenset {_admins::*} to all documents with filter {_filter} in {collection}
- ⚡ Little performances improvements by using better methods to retrieve all datas (6bd214b)
🟢 These changes should not make sudden changes. It will not require you to modify your current script to make it work.
As always, I am always open to any comments or suggestions!
🍃 Some improvements and new features
Originally wanting to publish bigger updates with more content, I will now be doing smaller updates but on a more regular schedule. Here is a quick summary of this update:
- ✨ Adding more error messages and better exceptions handling (#8 - adafdc2, big thanks to @deltarays !)
- 🔥 Remove Skript-based events as they're useless and will be replaced in the next update (c9b2b17)
- ✨ Better and beautiful console logging (851c7dd)
- ✨ Introducing more document features (closes #7) :
(delete|remove) mongo[db] [document[s]] %mongodocuments% from %mongocollection%
(all|every) mongo[db] documents (in|of) %mongocollection%
(1¦first|2¦all) [mongo[db]] document[s] where %string% (is|equals to) %object% (of|in) %mongocollection%
- ⚗️ Introducing experimental codecs (9277719)
Codecs are used to serialize Java objects so that they can be saved in a document.
Clearly, they make it possible to save Skript types other than what MongoDB supports.
The restoration of the correct data from a document has not been implemented yet.
🟠 This update requires changes in your script to make it work. Update to 1.1.2 to make it work without updating it.
💡 The GitHub wiki is now online! #10
Thank you for your suggestions and sorry for the delay of this update! As usual, I remain open to any suggestion or remark.
🍃 Introducing new events and bugfixes 🛰
This version of MongoSK fixes some problems due to an incompatibility with some syntaxes of Skript and the addition of new events.
As always, do not hesitate to contact me if you need help or if you have any suggestions.