Class: MassiveRecord::ORM::IdFactory::Timestamp
- Inherits:
-
Object
- Object
- MassiveRecord::ORM::IdFactory::Timestamp
- Includes:
- MassiveRecord::ORM::IdFactory
- Defined in:
- lib/massive_record/orm/id_factory/timestamp.rb
Overview
Factory class for ids based on time stamps. It does not guarantee uniqueness on ids, but if you use microseconds as precision you should be at least a bit better of then using seconds..
This factory is mostly intended to generate ids for embedded records, and was written as a result of Companybook not wanting to id the AtomicIncrementation id factory for every embedded record. It might be, in the future, an idea to take a second look at this one to make it guarantee it’s uniqueness of ids.