Skip to content

Releases: catfan/Medoo

Medoo v1.5.5

07 Mar 09:44
Compare
Choose a tag to compare

We fixed the customize DSN bug and update the year date.

Medoo v1.5.4

08 Jan 20:03
Compare
Choose a tag to compare

Fix error map key while output IN data

Medoo v1.5.3

25 Dec 17:09
Compare
Choose a tag to compare

We fixed some bug on Xmas.

Medoo v1.5.2

01 Dec 14:34
Compare
Choose a tag to compare

Emergency bug fix for incorrect type convert.

Medoo v1.5.1

24 Nov 16:09
Compare
Choose a tag to compare

Fix some bugs.

Medoo v1.5

21 Nov 12:23
Compare
Choose a tag to compare

We are happy to release the v1.5 with full of expectation. This version have included the most important feature - raw object, that can help you to build complex query conveniently and safely. We also optimized the whole project with better code organization and readability for better performance.

Using SQL Functions

Medoo 1.5 is now using raw object for complex query. The old version # is not supported anymore. It's much more powerful.

Medoo 1.5+

$database->insert("account", [
	"user_name" => "bar",
	"uid" => Medoo::raw("UUID()")
]);

Using Regular Expression

$data = $database->select('account', [
	'user_id',
	'user_name'
], [
	'user_name[REGEXP]' => '[a-z0-9]*'
]);
 
// SELECT "user_id","user_name"
// FROM "account"
// WHERE "user_name" REGEXP '[a-z0-9]*'

Outputting Query With Database Default Quote Identifier

As for Medoo 1.5, debug() will output the query with database default quote identifier from now. Like MySQL is using col and MSSQL is using [col] for quoting column. Keep in mind that, this is only output for debugging the query. Medoo is actually using standard quote identifier for internal execution for all database.

$data = $database->debug()->select('account', [
	'user_id',
	'user_name'
], [
	'user_name' => 'foo'
]);
 
// For MySQL
// SELECT `user_id`,`user_name`
// FROM `account`
// WHERE `user_name` = 'foo'
 
// For MSSQL
// SELECT [user_id],[user_name]
// FROM [account]
// WHERE [user_name] = 'foo'
 
// For Others
// SELECT "user_id","user_name"
// FROM "account"
// WHERE "user_name" = 'foo'

MSSQL Connection

Medoo 1.5 will use pdo_sqlsrv drvier for MSSQL database connection with all platform by default, because Microsoft released new pdo_sqlsrv driver for both Linux and Windows platform. If you want to use old version dblib driver, you can specify driver option with dblib value for using this driver.

$database = new Medoo([
	'database_type' => 'mysql',
	'database_name' => 'name',
	'server' => 'localhost',
	'username' => 'your_username',
	'password' => 'your_password',
 
	// [optional] If you want to force Medoo to use dblib driver for connecting MSSQL database
	'driver' => 'dblib'
]);

Improvements

  • Add possibility to use column alias and data type declaration at the same time
  • Improve transaction call
  • Improve replace logic
  • Code simplified and improved performance
  • Improve error info return for empty statement

Bug Fixes

  • Select number does not return floating point
  • Execute commands for SQLite initialization
  • Fix MSSQL LIMIT error
  • Fix has() method error with different database return
  • PDO::PARAM for double value

Medoo 1.4.5

24 Jun 14:47
Compare
Choose a tag to compare
  • Bug fixes for like and guid problem
  • Return false if prepare statement failed

Medoo 1.4.4

02 Jun 15:28
Compare
Choose a tag to compare
  • Bug fix for error() when statement is empty
  • Bug fix for using SQL function on select()

Medoo 1.4.3

22 May 04:43
Compare
Choose a tag to compare

Fixed error() bug and SQL function syntax for update and insert statement.

Medoo 1.4.2

16 May 14:37
Compare
Choose a tag to compare

Fixes bug for incorrect uniqid return on XAMMP Windows environment