dépendances entre plusieurs classes en chaîne.

WRInaute accro
Bonjour

Mon problème ( pour cet ORM que je compte faire ) :

Spécifier les dépendances entre ces classes : TABLE, SELECT, WHERE, GET.

TABLE('Table')->SELECT('Column')->WHERE('Column2', '=', $value)->GET();

J'ai cet injecteur de dépendances ( brut de brut ) :


Code:
<?php

class Container {
 protected $s=array();
 function __set($k, $c) { $this->s[$k]=$c; }
 function __get($k) { return $this->s[$k]($this); }
}

?>

Comment ( avec cet injecteur ou un autre ), représenter en code PHP, la dépendance chaînée ci-dessus ?

Je sais un peu programmer en POO, mais pas terrible. ;)

Merci beaucoup.
 
WRInaute accro
Pour chainer les méthodes, à la fin de chaque méthode il faut:
PHP:
<span class="syntaxdefault"></span><span class="syntaxkeyword">return&nbsp;</span><span class="syntaxdefault">$this</span><span class="syntaxkeyword">;&nbsp;</span><span class="syntaxdefault"></span>

NB: pourquoi réinventer encore et toujours la roue ? Eloquent de Laravel ça rox.
 
WRInaute accro
Bonjour spout

Super merci, je n'avais pas pensé à çà.

Sinon, pour le traitement PHP ( traduction syntaxe ORM => syntaxe MySQL et optimisation ), çà peut être fait avec des arrays. ;)

Mais... Quand on exécute une instruction PHP telle que :

Code:
  $result = DB::TABLE('Table')->SELECT('Column')->WHERE('Id','=', $value)->GET();

Celà revient à lancer la fonction TABLE, puis SELECT, puis WHERE etc... ou le contraire ?

Logiquement, l'interpréteur ( ou compilateur just in time ), procède de gauche à droite par défaut ?

Je suppose que c'est une question stupide, mais j'ai peur de commettre des boulettes...

Merci beaucoup pour ta réponse.

Respectueusement.
 
WRInaute accro
Pardon

Pour ce qui est de réinventer la roue, je reconnais que tu n'as pas tort. ;)

Ce que je veux, c'est optimiser au max, les perfs et autres choses.


Et puis c'est un challenge, quasiment une idée fixe pour moi. ;)

Respects.
 
WRInaute accro
Merci beaucoup spout

Super sympa, je vais me mettre à la prog.

J'ai déjà ( tu sais ), une classe Database qui me génère ( à peu près ), la syntaxe ORM à partir de MySQL ( le contraire ).

Je vais voir celà ce week-end. ;)

Super merci encore.

Respectueusement.
 
WRInaute accro
Bonjour

Je fais pour l'instant, le remplissage de mes arrays, avec affichage des paramètres un peu dégrossis.

Celà est fait avec une seule instruction PHP, de syntaxe classique Eloquent, et affichage ci-dessous mode Eloquent avec paramètres plus compatibles SQL classique.

Voici ce que celà donne pour l'instant :

PHP:
<span class="syntaxhtml"><br /><br /><span class="syntaxdefault"><?php<br /></span><span class="syntaxcomment">/*<br /> * PHP lancé :<br /> */<br /><br /></span><span class="syntaxdefault">$connexion </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> new Database</span><span class="syntaxkeyword">(</span><span class="syntaxstring">""</span><span class="syntaxkeyword">);<br /><br /></span><span class="syntaxdefault">$connexion</span><span class="syntaxkeyword">-></span><span class="syntaxdefault">TABLE</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyTable'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">INSERT</span><span class="syntaxkeyword">([</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">])<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">REPLACE</span><span class="syntaxkeyword">([</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">])<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">OR_WHERE</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_NULL</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_NOT_NULL</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_BETWEEN</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 1</span><span class="syntaxkeyword">])<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_NOT_BETWEEN</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">1</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 6</span><span class="syntaxkeyword">])<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_IN</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 1</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 2</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 3</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 4</span><span class="syntaxkeyword">])<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_NOT_IN</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">1</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 6</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 7</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 8</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 9</span><span class="syntaxkeyword">])<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_DATE</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_MONTH</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'='</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_DAY</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_YEAR</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">UPDATE</span><span class="syntaxkeyword">([</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">])<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">UPDATE</span><span class="syntaxkeyword">([<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue2_1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue2_2'</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">])<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">INSERT</span><span class="syntaxkeyword">([</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">]);<br /></span><span class="syntaxdefault">?><br /></span><br />/*<br /> * Résultat affiché :<br /> */ <br />        TABLE('MyTable')<br />        ->INSERT ('MyColumn1', 'MyColumn2') VALUES(`MyValue1_1`, `MyValue1_2`)<br />        ->REPLACE ('MyColumn1', 'MyColumn2') VALUES(`MyValue1_1`, `MyValue1_2`)<br />        ->WHERE `MyColumn1`<>`MyValue1_1`<br />        ->OR WHERE `MyColumn2`<>`MyValue1_2`<br />        ->WHERE 'MyColumn1' IS NULL<br />        ->WHERE 'MyColumn2' IS NOT NULL<br />        ->WHERE 'MyColumn1' BETWEEN 0 AND 1<br />        ->WHERE 'MyColumn2' NOT BETWEEN 1 AND 6<br />        ->WHERE 'MyColumn1' IN (1, 2, 3, 4)<br />        ->WHERE 'MyColumn2' NOT IN (1, 6, 7, 8, 9)<br />        ->WHERE `MyColumn1`=DATE('MyValue1_1')<br />        ->WHERE `MyColumn1`=MONTH('MyValue1_1')<br />        ->WHERE `MyColumn1`=DAY('MyValue1_1')<br />        ->WHERE `MyColumn1`>YEAR('MyValue1_1')<br />        ->UPDATE SET 'MyColumn1'=`MyValue1_1`, 'MyColumn2'=`MyValue1_2`<br />        ->UPDATE SET 'MyColumn1'=`MyValue1_1`, 'MyColumn2'=`MyValue1_2`<br />        ->UPDATE SET 'MyColumn1'=`MyValue2_1`, 'MyColumn2'=`MyValue2_2`<br />        ->INSERT ('MyColumn1') VALUES(`MyValue1_1`);<br /><br /></span>

La syntaxe de REPLACE est probablement fausse, je modifierai après.

Comme j'ai toutes ces données partielles dans mes variables indicées, ce sera très facile de générer dans tous les cas, le SQL à exécuter.

Je vais voir pour les autres type d'instructions MySQL.

Respectueusement.
 
WRInaute accro
Voili, voilou

Je groupe maintenant avec des AND, les différentes lignes d'une même instruction.

Voilà ce que celà donne :


PHP:
<span class="syntaxdefault"><br /><br /></span><span class="syntaxcomment">/*<br /> * PHP Lancé :<br /> */<br /><br /></span><span class="syntaxdefault">$connexion</span><span class="syntaxkeyword">-></span><span class="syntaxdefault">TABLE</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyTable'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">INSERT</span><span class="syntaxkeyword">([</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">])<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">REPLACE</span><span class="syntaxkeyword">([</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">])<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue2_1'</span><span class="syntaxkeyword">],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn3'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue3_1'</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_COLUMN</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_COLUMN</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue2_1'</span><span class="syntaxkeyword">],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn3'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue3_1'</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">OR_WHERE</span><span class="syntaxkeyword">([</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'<>'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">])<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_NULL</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,<br /></span><span class="syntaxdefault">                </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,<br /></span><span class="syntaxdefault">                </span><span class="syntaxstring">'MyColumn3'</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_BETWEEN</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 1</span><span class="syntaxkeyword">]],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">5</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 7</span><span class="syntaxkeyword">]]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_NOT_BETWEEN</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn4'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">1</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 6</span><span class="syntaxkeyword">]],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn5'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">4</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 8</span><span class="syntaxkeyword">]]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_IN</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 1</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 2</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 3</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 4</span><span class="syntaxkeyword">]],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">2</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 3</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 4</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 5</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 6</span><span class="syntaxkeyword">]]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_NOT_IN</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">4</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 5</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 6</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 7</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 8</span><span class="syntaxkeyword">]],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">2</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 3</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 4</span><span class="syntaxkeyword">]]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_DATE</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_MONTH</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_DAY</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_YEAR</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">UPDATE</span><span class="syntaxkeyword">(<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">],<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">[</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue2_1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue2_2'</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">                </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">INSERT</span><span class="syntaxkeyword">([</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">]);<br /><br /><br /></span><span class="syntaxcomment">/*<br /> * Affichage :<br /> */<br /><br /><br /></span><span class="syntaxdefault">    TABLE</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyTable'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">INSERT </span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> VALUES</span><span class="syntaxkeyword">(`</span><span class="syntaxstring">MyValue1_1</span><span class="syntaxkeyword">`,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyValue1_2</span><span class="syntaxkeyword">`)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">REPLACE </span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> VALUES</span><span class="syntaxkeyword">(`</span><span class="syntaxstring">MyValue1_1</span><span class="syntaxkeyword">`,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyValue1_2</span><span class="syntaxkeyword">`)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn1</span><span class="syntaxkeyword">`<>`</span><span class="syntaxstring">MyValue1_1</span><span class="syntaxkeyword">`<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn1</span><span class="syntaxkeyword">`<>`</span><span class="syntaxstring">MyValue1_1</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> AND </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn2</span><span class="syntaxkeyword">`<>`</span><span class="syntaxstring">MyValue2_1</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> AND </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn3</span><span class="syntaxkeyword">`<>`</span><span class="syntaxstring">MyValue3_1</span><span class="syntaxkeyword">`<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn1</span><span class="syntaxkeyword">`<>`</span><span class="syntaxstring">MyValue1_1</span><span class="syntaxkeyword">`<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_COLUMN </span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword"><></span><span class="syntaxstring">'MyValue1_1'<br /></span><span class="syntaxdefault">       &nbsp;</span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE_COLUMN </span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword"><></span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxdefault"> AND </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword"><></span><span class="syntaxstring">'MyValue2_1'</span><span class="syntaxdefault"> AND </span><span class="syntaxstring">'MyColumn3'</span><span class="syntaxkeyword"><></span><span class="syntaxstring">'MyValue3_1'<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">OR WHERE </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn2</span><span class="syntaxkeyword">`<>`</span><span class="syntaxstring">MyValue1_2</span><span class="syntaxkeyword">`<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn1</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> IS NULL AND </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn2</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> IS NULL AND </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn3</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> IS NULL<br />        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn1</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> BETWEEN 0 AND 1 AND </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn2</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> BETWEEN 5 AND 7<br />        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn4</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> NOT BETWEEN 1 AND 6 AND </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn5</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> NOT BETWEEN 4 AND 8<br />        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn1</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> IN </span><span class="syntaxkeyword">(</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 1</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 2</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 3</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 4</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> AND </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn2</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> IN </span><span class="syntaxkeyword">(</span><span class="syntaxdefault">2</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 3</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 4</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 5</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 6</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn1</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> NOT IN </span><span class="syntaxkeyword">(</span><span class="syntaxdefault">4</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 5</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 6</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 7</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 8</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> AND </span><span class="syntaxkeyword">`</span><span class="syntaxstring">MyColumn2</span><span class="syntaxkeyword">`</span><span class="syntaxdefault"> NOT IN </span><span class="syntaxkeyword">(</span><span class="syntaxdefault">2</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 3</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> 4</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">DATE</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> AND </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">DATE</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">MONTH</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> AND </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">MONTH</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">DAY</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> AND </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">DAY</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">WHERE </span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">YEAR</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyValue1_1'</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> AND </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">YEAR</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyValue1_2'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">UPDATE SET </span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">=`</span><span class="syntaxstring">MyValue1_1</span><span class="syntaxkeyword">`,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">=`</span><span class="syntaxstring">MyValue1_2</span><span class="syntaxkeyword">`<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">UPDATE SET </span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">=`</span><span class="syntaxstring">MyValue2_1</span><span class="syntaxkeyword">`,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'MyColumn2'</span><span class="syntaxkeyword">=`</span><span class="syntaxstring">MyValue2_2</span><span class="syntaxkeyword">`<br /></span><span class="syntaxdefault">        </span><span class="syntaxkeyword">-></span><span class="syntaxdefault">INSERT </span><span class="syntaxkeyword">(</span><span class="syntaxstring">'MyColumn1'</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> VALUES</span><span class="syntaxkeyword">(`</span><span class="syntaxstring">MyValue1_1</span><span class="syntaxkeyword">`)<br /><br /><br />&nbsp;</span><span class="syntaxdefault"></span>


Bien à vous.

Amicalement.
 
WRInaute accro
Rebonjour

Voilà j'ai tout sauf les RAW() et les mises en mémoire RAM des données lues.

Voici ce que celà donne :

La syntaxe Eloquent est celle de l'instruction PHP déclenchée.

La syntaxe Eloquent interprétée, n'est pas importante, les composantes de l'instruction MySQL résultante, sont mémorisées dans des arrays .

La syntaxe MySQL ( en bas ), est l'instruction MySQL, traduction de la syntaxe Eloquent.

Pour terminer, outre les RAW() ( théoriquement faciles ), je n'ai plus que les détails ( IGNORE, DELAYED, etc... ), et les fonctions de lecture : GET(), FIRST(), PLUCK(), VALUE(), etc...

J'ai déjà fait la fonction CHUNK() avec sa fonction anonyme de pagination.

Merci de me donner vos impressions.



Code:
/*
 *		Syntaxe Eloquent :
 *		****************
 */

	$connexion->TABLE('MyTable')
		->SELECT([
			['MyColumn1', 'MyColumn2'],
			['MyColumn3', 'MyColumn4']
		])
		->WHERE_BETWEEN(
			['MyColumn1', [0, 1]],
			['MyColumn2', [5, 7]]
		)
		->WHERE_NOT_BETWEEN(
			['MyColumn4', [1, 6]],
			['MyColumn5', [4, 8]]
		)
		->LOCK_FOR_UPDATE()
		->GET()

/*
 *		Syntaxe Eloquent interprétée :
 *		****************************
 */

		TABLE(MyTable)
		->SELECT `MyColumn1`, `MyColumn2`
		->SELECT `MyColumn3`, `MyColumn4`
		->WHERE `MyColumn1` BETWEEN 0 AND 1 AND `MyColumn2` BETWEEN 5 AND 7
		->WHERE `MyColumn4` NOT BETWEEN 1 AND 6 AND `MyColumn5` NOT BETWEEN 4 AND 8
		->LOCK_FOR_UPDATE()

/*
 *		Syntaxe MySQL :
 *		*************
 */
		SELECT `MyColumn1`, `MyColumn2` FROM MyTable WHERE `MyColumn1` BETWEEN 0 AND 1 AND `MyColumn2` BETWEEN 5 AND 7 AND `MyColumn4` NOT BETWEEN 1 AND 6 AND `MyColumn5` NOT BETWEEN 4 AND 8 FOR UPDATE

		SELECT `MyColumn3`, `MyColumn4` FROM MyTable WHERE `MyColumn1` BETWEEN 0 AND 1 AND `MyColumn2` BETWEEN 5 AND 7 AND `MyColumn4` NOT BETWEEN 1 AND 6 AND `MyColumn5` NOT BETWEEN 4 AND 8 FOR UPDATE
 
WRInaute accro
Rebonjour

Voilà, j'ai fait tout sauf les sous-requêtes autres que DB::chunk().

J'aurais besoin de savoir, quels sont tous les cas de Closures ( fonctions anonymes paramètres d'une fonction Eloquent ), autres que la Closure de DB::chunk().

Par exemple je sais qu'il y a :
Code:
 DB::OrWhere(function($query) {})

Mais y a-t-il aussi :
Code:
 DB::Where(function($query) {} )
?

Et les autres Where avec des sous-requêtes ?

Par exemple les WhereIn ?

Merci beaucoup.

Respectueusement.
 
Discussions similaires
Haut