Class Index [+]

Quicksearch

Sequel::Plugins::PreparedStatementsSafe

The prepared_statements_safe plugin modifies the model to reduce the number of prepared statements that can be created, by setting as many columns as possible before creating, and by changing save_changes to save all columns instead of just the changed ones.

This plugin depends on the prepared_statements plugin.

Usage:

  # Make all model subclasses more safe when using prepared statements (called before loading subclasses)
  Sequel::Model.plugin :prepared_statements_safe

  # Make the Album class more safe when using prepared statements
  Album.plugin :prepared_statements_safe

Public Class Methods

apply(model) click to toggle source

Depend on the prepared_statements plugin

    # File lib/sequel/plugins/prepared_statements_safe.rb, line 19
19:       def self.apply(model)
20:         model.plugin(:prepared_statements)
21:       end
configure(model) click to toggle source

Set the column defaults to use when creating on the model.

    # File lib/sequel/plugins/prepared_statements_safe.rb, line 24
24:       def self.configure(model)
25:         model.send(:set_prepared_statements_column_defaults)
26:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.