Top Level Namespace
Defined Under Namespace
Modules: BlackStack
Instance Method Summary collapse
-
#guid ⇒ Object
return a postgresql uuid.
-
#now ⇒ Object
return current datetime with format ‘YYYY-MM-DD HH:MM:SS`.
Instance Method Details
#guid ⇒ Object
return a postgresql uuid
22 23 24 25 26 27 28 29 30 |
# File 'lib/blackstack-db.rb', line 22 def guid() if BlackStack.db_type == BlackStack::TYPE_POSTGRESQL return BlackStack::PostgreSQL.guid elsif BlackStack.db_type == BlackStack::TYPE_CRDB return BlackStack::CRDB.guid else raise "Unknown database type" end end |
#now ⇒ Object
return current datetime with format ‘YYYY-MM-DD HH:MM:SS`
33 34 35 36 37 38 39 40 41 |
# File 'lib/blackstack-db.rb', line 33 def now() if BlackStack.db_type == BlackStack::TYPE_POSTGRESQL return BlackStack::PostgreSQL.now elsif BlackStack.db_type == BlackStack::TYPE_CRDB return BlackStack::CRDB.now else raise "Unknown database type" end end |