Collectionobject offers a way to query the database and perform operations on large groups of model.
Collection, you can simply call the method
queryover the model class:
to_aover the Collection will fetch all the models from the database to your crystal code:
Collection#dupto duplicate the current state of the collection: