Module: DBViewCTI::Model::CTI::SQL::ClassMethods
- Includes:
- SQLGeneration::Model
- Defined in:
- lib/db_view_cti/model/cti/sql.rb
Instance Method Summary collapse
-
#cti_table_count ⇒ Object
this method is only used in testing.
Methods included from SQLGeneration::Model
#cti_inner_join_sql, #cti_outer_join_sql
Instance Method Details
#cti_table_count ⇒ Object
this method is only used in testing. It returns the number of rows present in the real database table, not the number of rows present in the view (as returned by count)
13 14 15 16 |
# File 'lib/db_view_cti/model/cti/sql.rb', line 13 def cti_table_count result = connection.execute("SELECT COUNT(*) FROM #{DBViewCTI::Names.table_name(self)};") result[0]['count'].to_i end |