Giter Site home page Giter Site logo

order_by_primary_key's Introduction

This gem is a rails plugin for adding an ORDER BY PRIMARY KEY default scope to every model and to any eager loaded joins.  It also reverses the precedence of multiple order by conditions so they behave in a more object oriented fashion and allows for our default ORDER BY PRIMARY KEY scope to have the lowest precedence.

This gem is useful if you need to transition from MySQL to a database that does not guarantee order by primary key unless requested (e.g. clustrix, postgres, etc.).  It may be less work to use this gem than fix all of the places in your application code and tests where you may be assuming order even though you didn't specify it.

Use at your own risk, only tested on Rails 3.0.10.

order_by_primary_key's People

Contributors

cswilliams avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.