SHARE
TWEET

Untitled

a guest Oct 16th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.    anon_1.amnesia_multilingual_document_translation_language_id AS anon_1_amnesia_multilingual_document_translation_language_1,
  3.    anon_1.amnesia_multilingual_content_translation_language_id AS anon_1_amnesia_multilingual_content_translation_language__2,
  4.    anon_1.amnesia_multilingual_document_translation_content_id AS anon_1_amnesia_multilingual_document_translation_content__3,
  5.    anon_1.amnesia_multilingual_content_translation_content_id AS anon_1_amnesia_multilingual_content_translation_content_i_4,
  6.    anon_1.amnesia_multilingual_content_translation_title AS anon_1_amnesia_multilingual_content_translation_title,
  7.    anon_1.amnesia_multilingual_content_translation_description AS anon_1_amnesia_multilingual_content_translation_descripti_5,
  8.    anon_1.amnesia_multilingual_content_translation_fts AS anon_1_amnesia_multilingual_content_translation_fts,
  9.    (
  10.       SELECT
  11.          content.content_type_id
  12.       FROM
  13.          content
  14.       WHERE
  15.          anon_1.amnesia_multilingual_content_translation_content_id = content.id
  16.    )
  17.    AS anon_2,
  18.    anon_1.amnesia_multilingual_document_translation_body AS anon_1_amnesia_multilingual_document_translation_body,
  19.    language_1.id AS language_1_id,
  20.    language_1.name AS language_1_name
  21. FROM
  22.    (
  23.       SELECT
  24.          amnesia_multilingual.content_translation.language_id AS amnesia_multilingual_content_translation_language_id,
  25.          amnesia_multilingual.content_translation.content_id AS amnesia_multilingual_content_translation_content_id,
  26.          amnesia_multilingual.content_translation.title AS amnesia_multilingual_content_translation_title,
  27.          amnesia_multilingual.content_translation.description AS amnesia_multilingual_content_translation_description,
  28.          amnesia_multilingual.content_translation.fts AS amnesia_multilingual_content_translation_fts,
  29.          amnesia_multilingual.document_translation.language_id AS amnesia_multilingual_document_translation_language_id,
  30.          amnesia_multilingual.document_translation.content_id AS amnesia_multilingual_document_translation_content_id,
  31.          amnesia_multilingual.document_translation.body AS amnesia_multilingual_document_translation_body,
  32.          row_number() OVER (PARTITION BY amnesia_multilingual.document_translation.content_id
  33.       ORDER BY
  34.          amnesia_multilingual.document_translation.language_id = % (param_1)s DESC, amnesia_multilingual.document_translation.language_id = % (param_2)s DESC) AS index
  35.       FROM
  36.          amnesia_multilingual.content_translation
  37.          JOIN
  38.             amnesia_multilingual.document_translation
  39.             ON amnesia_multilingual.content_translation.language_id = amnesia_multilingual.document_translation.language_id
  40.             AND amnesia_multilingual.content_translation.content_id = amnesia_multilingual.document_translation.content_id
  41.       WHERE
  42.          amnesia_multilingual.document_translation.language_id IN
  43.          (
  44.              % (param_1)s,
  45.             % (param_2)s
  46.          )
  47.    )
  48.    AS anon_1
  49.    JOIN
  50.       language AS language_1
  51.       ON language_1.id = anon_1.amnesia_multilingual_content_translation_language_id
  52. WHERE
  53.    anon_1.amnesia_multilingual_document_translation_content_id = % (param_3)s
  54.    AND anon_1.index = % (index_1)s
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top