Skip to content

Commit

Permalink
still WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
superette committed Sep 20, 2019
1 parent b460482 commit 21b96a0
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions postgresql/json.xml
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ SELECT doc->'site_name' FROM websites
<para>
La classe d'opérateur GIN par défaut pour <type>jsonb</type> supporte les
requêtes avec des opérateurs de haut niveau clé-existe <literal>?</literal>, <literal>?&amp;</literal>
et des opérateurs <literal>?|</literal> et l'opérateur chemin/valeur-existe
et des opérateurs <literal>?|</literal> et l'opérateur path/valeur-existe
<literal>@&gt;</literal>.
(Pour des détails sur la sémantique que ces opérateurs implémentent,
voir <xref linkend="functions-jsonb-op-table"/>.)
Expand Down Expand Up @@ -508,8 +508,8 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] == "qui"';
SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] ? (@ == "qui")';
</programlisting>
L'index GIN extrait les informations de la forme suivante du
<literal>jsonpath</literal>: <literal>chaîne accesseur = const</literal>.
La chaîne d'accesseurs peut être <literal>.key</literal>,
<literal>jsonpath</literal>: <literal>chaîne d'acccès = const</literal>.
La chaîne d'accès peut être <literal>.key</literal>,
<literal>[*]</literal> et <literal>[index]</literal>.
<literal>jsonb_ops</literal> supporte aussi les syntaxes <literal>.*</literal>
et <literal>.**</literal>.
Expand Down Expand Up @@ -659,7 +659,7 @@ SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc @&gt; '{"tags": ["qu
SQL/JSONpath dans <productname>PostgreSQL</productname> de façon à requêter
correctement dans les données JSON.
Cela fournit une représentation binaire de l'expression SQL/JSONpath analysée
qui spécifie les items qui doivent être récupérés par le moteur de chemin
qui spécifie les items qui doivent être récupérés par le moteur de path
depuis les données JSON pour être traités par la suite avec les fonctions
de requêtage SQL/JSON.
</para>
Expand All @@ -680,69 +680,70 @@ SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc @&gt; '{"tags": ["qu
</listitem>
<listitem>
<para>
Les crochets <literal>[]</literal> est utilisé pour accéder à un tableau.
Les crochets <literal>[]</literal> sont utilisés pour accéder à un tableau.
</para>
</listitem>
<listitem>
<para>
Les tableaux SQL/JSON commencent à partir de 0, contrairement aux tableaux SQL classiques
qui commmencent à 1.
Les tableaux SQL/JSON commencent à partir de 0, contrairement aux tableaux SQL
classiques qui commmencent à 1.
</para>
</listitem>
</itemizedlist>

<para>
An SQL/JSON path expression is an SQL character string literal,
so it must be enclosed in single quotes when passed to an SQL/JSON
query function. Following the JavaScript
conventions, character string literals within the path expression
must be enclosed in double quotes. Any single quotes within this
character string literal must be escaped with a single quote
by the SQL convention.
Lorsqu'elle est passée dans une fonction de requête SQL/JSON, une expression
SQL/JSONpath étant une chaîne de caractères SQL, de ce fait elle doit être
entourée de guillemets simple ('').
En suivant la convention JavaScript, les chaînes de caractères doivent être entourée
de guillemets double ("").
Selon la convention SQL, tous les guillemets simple dans ces chaînes de caractère doivent
être échappés avec un guillemet simple.
</para>

<para>
A path expression consists of a sequence of path elements,
which can be the following:
Une expression path consiste en une séquence d'éléments path, qui peuvent
être les suivants:
<itemizedlist>
<listitem>
<para>
Path literals of JSON primitive types:
Unicode text, numeric, true, false, or null.
Path litéral de type primitifs JSON:
Unicode text, numeric, true, false, ou null.
</para>
</listitem>
<listitem>
<para>
Path variables listed in <xref linkend="type-jsonpath-variables"/>.
Variables Path listées dans <xref linkend="type-jsonpath-variables"/>.
</para>
</listitem>
<listitem>
<para>
Accessor operators listed in <xref linkend="type-jsonpath-accessors"/>.
Opérateurs d'accès listés dans <xref linkend="type-jsonpath-accessors"/>.
</para>
</listitem>
<listitem>
<para>
<type>jsonpath</type> operators and methods listed
in <xref linkend="functions-sqljson-path-operators"/>
Opérateurs et méthodes <type>jsonpath</type> listés dans
<xref linkend="functions-sqljson-path-operators"/>
</para>
</listitem>
<listitem>
<para>
Parentheses, which can be used to provide filter expressions
or define the order of path evaluation.
Les parenthèses, qui peuvent être utilisées pour filtrer des expressions
ou définir l'ordre d'évaluation des Path.
</para>
</listitem>
</itemizedlist>
</para>

<para>
For details on using <type>jsonpath</type> expressions with SQL/JSON
query functions, see <xref linkend="functions-sqljson-path"/>.

Pour plus de détails concernant l'utilisation des expressions <type>jsonpath</type>
avec des fonctions de requête SQL/JSON, voir <xref linkend="functions-sqljson-path"/>.
</para>

<table id="type-jsonpath-variables">
<title><type>jsonpath</type> Variables</title>
<title>Variables <type>jsonpath</type></title>
<tgroup cols="2">
<thead>
<row>
Expand All @@ -753,17 +754,17 @@ SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc @&gt; '{"tags": ["qu
<tbody>
<row>
<entry><literal>$</literal></entry>
<entry>A variable representing the JSON text to be queried
(the <firstterm>context item</firstterm>).
<entry>Une variable qui représente le JSON text à requêter
(L' <firstterm>item de contexte</firstterm>).
</entry>
</row>
<row>
<entry><literal>$varname</literal></entry>
<entry>
A named variable. Its value can be set by the parameter
<parameter>vars</parameter> of several JSON processing functions.
See <xref linkend="functions-json-processing-table"/> and
its notes for details.
Une variable nommée. Le paramètre <parameter>vars</parameter> présent dans
de nombreuses fonctions de traitement JSON, permet de définir sa valeur.
Voir <xref linkend="functions-json-processing-table"/> ainsi que les notes
pour plus de détails.
<!-- TODO: describe PASSING clause once implemented !-->
</entry>
</row>
Expand Down

0 comments on commit 21b96a0

Please sign in to comment.