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
53 54 55 56 57 58 59 60 61 |
# File 'lib/blackstack-db.rb', line 53 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`
64 65 66 67 68 69 70 71 72 |
# File 'lib/blackstack-db.rb', line 64 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 |