Table of Contents - Sequel: The Database Toolkit for Ruby
Pages
-
CHANGELOG
-
MIT-LICENSE
-
README
-
active_record
- Sequel for ActiveRecord Users
- Introduction
- Automatic Mapping
- Associations
- Compositions
- Validations
- Hooks/Callbacks
- Inheritance
- Transactions
- Reflection
- Direct Manipulation
- Database Abstraction
- Logging
- Migrations
- Differences
- Method Chaining
- No Need for SQL String Fragments
- Flexible Overriding
- method_missing Missing
- Associations
- Eager Loading
- Options
- Shared options
- belongs_to
- has_one, has_many
- has_and_belongs_to_many
- Validation Errors
- Sequel Configuration Flags
- ActiveRecord Method to Sequel Method Mapping
- Class Methods with Significantly Different Behavior
- abstract_class, abstract_class=, abstract_class?
- all
- column_names
- columns
- composed_of
- connected?
- connection
- count_by_sql
- delete, delete_all
- destroy, destroy_all
- establish_connection
- exists?
- find
- find_by_sql
- first
- last
- named_scope
- reset_column_information
- serialize, seralized_attributes
- set_inheritance_column
- set_sequence_name
- table_exists?
- transaction
- update, update_all
- with_scope
- Class Methods with Roughly the Same Behavior
- Class Methods without an Equivalent
- Instance Methods with Significantly Different Behavior
- attribute_names
- becomes
- column_for_attribute
- connection
- decrement, increment
- decrement!, increment!
- has_attribute?
- invalid?
- save, save!, save_with_validation, save_with_validation!
- toggle, toggle
- transaction
- update_attribute
- update_attributes, update_attributes!
- Instance Methods with Roughly the Same Behavior
- Instance Methods without an Equivalent
-
advanced_associations
-
association_basics
- Association Basics
- Why Associations?
- The Types of Associations
- many_to_one
- one_to_many and one_to_one
- many_to_many and one_through_one
- Differences Between many_to_one and one_to_one
- Most Common Options
- :key
- :class
- Self-referential Associations
- Methods Added
- Caching
- Dataset Method
- Dynamic Association Modification
- Filtering By Associations
- Name Collisions
- Database Schema
- many_to_one/one_to_many
- many_to_many
- Association Scope
- Method Details
- association(reload = false) (e.g. albums)
- association=(object_to_associate) (e.g. artist=) [many_to_one and one_to_one]
- add_association(object_to_associate) (e.g. add_album) [one_to_many and many_to_many]
- remove_association(object_to_disassociate) (e.g. remove_album) [one_to_many and many_to_many]
- remove_all_association (e.g. remove_all_albums) [one_to_many and many_to_many]
- association_dataset (e.g. albums_dataset)
- Overriding Method Behavior
- _association= (:setter option)
- _add_association (:adder option)
- _remove_association (:remover option)
- _remove_all_association (:clearer option)
- Association Options
- Association Dataset Modification Options
- block
- :class
- :key
- :conditions
- :order
- :select
- :limit
- :join_table [many_to_many, one_through_one]
- :left_key [many_to_many, one_through_one]
- :right_key [many_to_many, one_through_one]
- :distinct
- :clone
- :dataset
- :extend
- :primary_key [many_to_one, one_to_one, one_to_many]
- :left_primary_key [many_to_many, one_through_one]
- :right_primary_key [many_to_many, one_through_one]
- :join_table_block [many_to_many, one_through_one]
- Callback Options
- :before_add [one_to_many, many_to_many]
- :after_add [one_to_many, many_to_many]
- :before_remove [one_to_many, many_to_many]
- :after_remove [one_to_many, many_to_many]
- :before_set [many_to_one, one_to_one]
- :after_set [many_to_one, one_to_one]
- :after_load
- :uniq [many_to_many]
- Eager Loading via eager (query per association) Options
- :eager
- :eager_loader
- :eager_loader_key
- :eager_block
- Eager Loading via eager_graph (one query with joins) Options
- :eager_graph
- :graph_conditions
- :graph_block
- :graph_join_type
- :graph_select
- :graph_only_conditions
- :graph_alias_base
- :eager_grapher
- :order_eager_graph
- :graph_order
- :graph_join_table_conditions [many_to_many, one_through_one]
- :graph_join_table_block [many_to_many, one_through_one]
- :graph_join_table_join_type [many_to_many, one_through_one]
- :graph_join_table_only_conditions [many_to_many, one_through_one]
- Column Naming Conflict Options
- :key_column [many_to_one]
- :primary_key_method [many_to_one]
- :primary_key_column [one_to_many, one_to_one]
- :key_method [one_to_many, one_to_one]
- :left_primary_key_column [many_to_many, one_through_one]
- :right_primary_key_method [many_to_many, one_through_one]
- Private Method Overriding Options
- :setter [*_to_one associations]
- :adder [*_to_many associations]
- :remover [*_to_many associations]
- :clearer [*_to_many associations]
- Advanced Options
- :reciprocal
- :read_only
- :validate
- :raise_on_save_failure [one_to_many associations]
- :allow_eager
- :cartesian_product_number
- :methods_module
- :eager_limit_strategy
- :subqueries_per_union
- :filter_limit_strategy
-
bin_sequel
-
cheat_sheet
-
code_order
-
core_extensions
-
dataset_basics
-
dataset_filtering
-
extensions
-
mass_assignment
-
migration
-
model_hooks
-
model_plugins
-
mssql_stored_procedures
-
object_model
-
opening_databases
-
postgresql
-
prepared_statements
-
querying
-
reflection
-
1.0
-
1.1
-
1.3
-
1.4.0
-
1.5.0
-
2.0.0
-
2.1.0
-
2.10.0
-
2.11.0
-
2.12.0
-
2.2.0
-
2.3.0
-
2.4.0
-
2.5.0
-
2.6.0
-
2.7.0
-
2.8.0
-
2.9.0
-
3.0.0
-
3.1.0
-
3.10.0
-
3.11.0
-
3.12.0
-
3.13.0
-
3.14.0
-
3.15.0
-
3.16.0
-
3.17.0
-
3.18.0
-
3.19.0
-
3.2.0
-
3.20.0
-
3.21.0
-
3.22.0
-
3.23.0
-
3.24.0
-
3.25.0
-
3.26.0
-
3.27.0
-
3.28.0
-
3.29.0
-
3.3.0
-
3.30.0
-
3.31.0
-
3.32.0
-
3.33.0
-
3.34.0
-
3.35.0
-
3.36.0
-
3.37.0
-
3.38.0
-
3.39.0
-
3.4.0
-
3.40.0
-
3.41.0
-
3.42.0
-
3.43.0
-
3.44.0
-
3.45.0
-
3.46.0
-
3.47.0
-
3.48.0
-
3.5.0
-
3.6.0
-
3.7.0
-
3.8.0
-
3.9.0
-
4.0.0
-
4.1.0
-
4.10.0
-
4.11.0
-
4.12.0
-
4.13.0
-
4.14.0
-
4.15.0
-
4.16.0
-
4.2.0
-
4.3.0
-
4.4.0
-
4.5.0
-
4.6.0
-
4.7.0
-
4.8.0
-
4.9.0
-
schema_modification
-
security
-
sharding
-
sql
- Sequel for SQL Users
- You Can Just Use SQL
- SELECT
- INSERT, UPDATE, DELETE
- Other Queries
- Other Places
- Translating SQL Expressions into Sequel
- Database#literal
- Database Loggers
- Identifiers
- Numbers
- Strings
- Aliasing
- Functions
- Aggregate Functions
- Window Functions
- Schema Qualified Functions
- Equality Operator (=)
- Not Equal Operator (!=)
- Inclusion and Exclusion Operators (IN, NOT IN)
- Identity Operators (IS, IS NOT)
- Inversion Operator (NOT)
- Inequality Operators (< > <= >=)
- Standard Mathematical Operators (+ - * /)
- Boolean Operators (AND OR)
- Casts
- Bitwise Mathematical Operators (& | ^ << >> ~)
- String Operators (||, LIKE, Regexp)
- Order Specifications (ASC, DESC)
- All Columns (.*)
- CASE statements
- Subscripts/Array Access ([])
- Building Queries in Sequel
- Creating Datasets
- Chaining Methods
- Using the Same Dataset for SELECT, INSERT, UPDATE, and DELETE
- Methods Used for Each SQL Clause
-
testing
-
thread_safety
-
transactions
-
validations
-
virtual_rows
Classes/Modules
Methods