Class: BaseBranch::Database::Adapter::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/base_branch/database/adapter/base.rb

Direct Known Subclasses

Postgresql

Class Method Summary collapse

Class Method Details

.orm_execute(stmt) ⇒ Object



5
6
7
# File 'lib/base_branch/database/adapter/base.rb', line 5

def orm_execute(stmt)
  ActiveRecord::Base.connection.execute stmt
end

.orm_sanitize(field) ⇒ Object



9
10
11
# File 'lib/base_branch/database/adapter/base.rb', line 9

def orm_sanitize(field)
  ActiveRecord::Base.sanitize field
end

.orm_successfully_executed?(result) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/base_branch/database/adapter/base.rb', line 13

def orm_successfully_executed?(result)
  result.result_status == 1
end