Module: Wlog::LogEntrySql
- Included in:
- LogEntry
- Defined in:
- lib/wlog/domain/sql_modules/log_entry_sql.rb
Overview
Constant Summary collapse
- TableName =
The table name of the log entries table
"log_entries"
- InsertSql =
Standard insert
"INSERT INTO #{TableName} (description,date,issue_id) values (?,?,?);"
- DeleteSql =
Standard delete
"DELETE FROM #{TableName} WHERE id = ? ;"
- SelectAll =
Standard select all
"SELECT * FROM #{TableName} ORDER BY date ASC;"
- UpdateSql =
Standard update
"UPDATE #{TableName} SET description = ? WHERE id = ?;"
- SelectAllLimit =
select all with a limit
"SELECT * FROM #{TableName} WHERE date >="\ " #{Time.now.to_i - 604800 - 24 * 60 * 60} ORDER BY date ASC"
- Select =
Select by id
"SELECT * FROM #{TableName} WHERE id = ? ;"
- SelectAllByIssue =
Select by id
"SELECT * FROM #{TableName} WHERE issue_id = ? ;"
- SelectDescriptionLike =
Select by a regex like /…/i
"SELECT * FROM #{TableName} WHERE description LIKE ?;"