nramenta / dabble

Lightweight wrapper and collection of helpers for MySQLi
MIT License
13 stars 4 forks source link

Support for LOW_ and HIGH_PRIORITY #8

Open anoxic opened 7 years ago

anoxic commented 7 years ago

For use in statements such as

INSERT HIGH_PRIORITY INTO `table` values();

I was working on a pull request for this, and then I realized that I'm not sure if it makes sense to simply add another parameter to existing methods, or if it would be better to add a stateful approach, so that the signature for existing methods don't need to change.

$id = null;
$db->insert("table", $values, $bindings, $id, "high");
// or
$id = null;
$db->insert("table", $values, $bindings, $id, $db::HIGH_PRIORITY);

versus

$db->priority("high");
$db->insert("table", $values, $bindings);

I would like to get some input on what would be preferable for Dabble. I tend to prefer the second option.

nramenta commented 7 years ago

I also prefer the second option.