Sha256: ce59b2e6b6dbc0d5c356c53056c3cffa8b4270fda15390acb0a696684d6f5e3b
Contents?: true
Size: 657 Bytes
Versions: 6
Compression:
Stored size: 657 Bytes
Contents
module Wlog # Sql for polymorphic attachments # @author Simon Symeonidis module PolymorphicAttachmentsSql # The table name TableName = "polymorphic_attachments" # Select entries by discriminator name, and id SelectSql = "SELECT * FROM #{TableName} WHERE "\ "discriminator = ? AND discriminator_id = ? " # Insert an attachment given the current thing in hand InsertSql = "INSERT INTO #{TableName} "\ "(discriminator, discriminator_id, attachment_id) values "\ "(? , ? , ?)" # Delete an attachment from the attached thing DeleteSql = "DELETE FROM #{TableName} WHERE "\ "discriminator = ? AND discriminator_id = ?" end end
Version data entries
6 entries across 6 versions & 1 rubygems