Skip to content

Medoo v2.1.0

Compare
Choose a tag to compare
@catfan catfan released this 07 Jun 02:13
· 61 commits to master since this release

Raw for BETWEEN

$this->database->select("account", "user_name", [
	"birthday[<>]" => [
		Medoo::raw("to_date(:from, 'YYYY-MM-DD')", [":from" => '2015/05/15']),
		Medoo::raw("to_date(:to, 'YYYY-MM-DD')", [":to" => '2025/05/15'])
	]
]);
SELECT "user_name"
FROM "account"
WHERE
("birthday" BETWEEN to_date('2015/05/15', 'YYYY-MM-DD') AND to_date('2025/05/15', 'YYYY-MM-DD'))

LOBs for Oracle

Better support for inserting and updating LOBs for the Oracle database.

$fp = fopen('foo.dat', 'r');

$database->insert("ACCOUNT", [
	"NAME" => "foo",
	"DATA" => $fp
], "ID");

$database->update("ACCOUNT", [
	"DATA" => $fp
], [
	"ID" => 1
]);
  • The regex for matching table name and column name is [\p{L}_][\p{L}\p{N}@$#\-_]+.
  • The performance is slightly improved.