* If two UUIDs are both of version one, they are compared based on their timestamp. Otherwise, or when the timestamp comparison results in a tie, they are compared by their bytes.
Because there are two internal number types ``Int`` and ``Float`` under the umbrella type ``Number``, sorting numbers can be more complex than anticipated.
When sorting, the integer always comes before the equivalent float. For example, ``1.0 == 1``, ``1.0 >= 1`` and ``1.0 <= 1`` all evaluate to true, but when sorting ``1`` and ``1.0`` are two _different_ values and ``1`` is placed before ``1.0``.
This may create problems when applying aggregations since if a grouping key contains both ``1.0`` and ``1``, they are treated as separate group headings. In such cases, it may help to use explicit coercion ``to_float`` or ``round`` to coerce all sorted values to the same type.
----------------
Value literals
----------------
``null`` for the type ``Null``, ``false`` and ``true`` for the type ``Bool`` are standard.
Numbers ...
Strings ...
There is no literal representation for ``Bytes`` due to restrictions placed by JSON. But ...
When retrieving triples' values, the schema-type ``Ref``, is represented by the type ``Uuid``. The entity (the subject of the triple) is always a ``Ref``, always represented by a ``Uuid``.
Note the absence of the ``Null`` type in schema-types.
When asserting (inserting or updating) triples, if a value given is not of the correct schema-type, Cozo will first try to coerce the value and will only error out if no known coercion methods exist.