Module ::PostgreSQL
In: lib/jdbc_adapter/jdbc_postgre.rb

Methods

Classes and Modules

Module ::PostgreSQL::Column

Public Class methods

Public Instance methods

ORDER BY clause for the passed order option.

PostgreSQL does not allow arbitrary ordering when using DISTINCT ON, so we work around this by wrapping the sql as a sub-select and ordering in that query.

SELECT DISTINCT clause for a given set of columns and a given ORDER BY clause.

PostgreSQL requires the ORDER BY columns in the select list for distinct queries, and requires that the ORDER BY include the distinct column.

  distinct("posts.id", "posts.created_at desc")

From postgresql_adapter.rb

Find a table‘s primary key and sequence.

the point here is really just to empty the database, not recreate it so we delete all tables

Resets sequence to the max value of the table‘s pk if present.

[Validate]