As you know, MySQL 8.0 can be used as JSON Document Store to
store your documents without being linked to any schema. You can
also use CRUD operations to deal with these documents using the
MySQL X DevAPI.
Of course in documents, it’s possible to also store temporal
attributes like date, time, datetime, …
Let’s see how we can deal with such attributes.
This is an example of a collection of documents with a datetime
attribute createdOn
:
As those attributes don’t have a real type, can we use the
createdOn
attribute as if it was a real datetime
field ?
Let’s try to get all the documents have a created data >
'2021-12-02'
:
We can see that the document “dave” has been
filtered out. However, we can see that “kenny”
and “miguel” are also present… and this is
correct as …
[Read more]