Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
catfan committed May 10, 2017
2 parents b5a788c + 317db42 commit 62b1f34
Show file tree
Hide file tree
Showing 6 changed files with 596 additions and 320 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.RTF diff=astextplain
115 changes: 84 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,18 @@ local.properties
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
Expand All @@ -59,29 +69,47 @@ local.properties
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.dotCover

## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
Expand All @@ -94,56 +122,84 @@ DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish
publish/

# Publish Web Output
*.Publish.xml
*.pubxml
*.publishproj

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
[Bb]in
[Oo]bj
sql
TestResults
sql/
*.Cache
ClientBin
stylecop.*
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf


############
## Windows
############
#############
## Windows detritus
#############

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac crap
.DS_Store


#############
## Python
#############

*.py[co]
*.py[cod]

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg

# Installer logs
Expand All @@ -157,7 +213,4 @@ pip-log.txt
*.mo

#Mr Developer
.mr.developer.cfg

# Mac crap
.DS_Store
.mr.developer.cfg
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[MIT LICENSE]

Copyright (c) 2017 Angel Lai, http://medoo.in
Copyright (c) 2017 Angel Lai, https://medoo.in

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
35 changes: 24 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
## Main Features

* **Lightweight** - 26KB around with only one file.
* **Lightweight** - 32KB around with only one file.

* **Easy** - Extremely easy to learn and use, friendly construction.

* **Powerful** - Support various common and complex SQL queries, data mapping, and prevent SQL injection.
* **Powerful** - Supports various common and complex SQL queries, data mapping, and prevent SQL injection.

* **Compatible** - Support all SQL databases, including MySQL, MSSQL, SQLite, MariaDB, Sybase, Oracle, PostgreSQL and more.
* **Compatible** - Supports all SQL databases, including MySQL, MSSQL, SQLite, MariaDB, Sybase, Oracle, PostgreSQL and more.

* **Friendly** - Work well with every PHP frameworks, like Laravel, Codeigniter, Yii, Slim, and framework which supports singleton extension.
* **Friendly** - Works well with every PHP frameworks, like Laravel, Codeigniter, Yii, Slim, and framework which supports singleton extension.

* **Free** - Under MIT license, you can use it anywhere if you want.

Expand Down Expand Up @@ -53,17 +53,30 @@ $database = new Medoo([
'database_name' => 'name',
'server' => 'localhost',
'username' => 'your_username',
'password' => 'your_password',
'charset' => 'utf8'
'password' => 'your_password'
]);

// Enjoy
$database->insert('account', [
'user_name' => 'foo',
'email' => '[email protected]',
'age' => 25,
'lang' => ['en', 'fr', 'jp', 'cn']
'email' => '[email protected]'
]);

$data = $database->select('account', [
'user_name',
'email'
], [
'user_id' => 50
]);

echo json_encode($data);

// [
// {
// "user_name" : "foo",
// "email" : "[email protected]",
// }
// ]
```

## Contribution Guides
Expand All @@ -80,6 +93,6 @@ Medoo is under the MIT license.

## Links

* Official website: [http://medoo.in](http://medoo.in)
* Official website: [https://medoo.in](https://medoo.in)

* Documentation: [http://medoo.in/doc](http://medoo.in/doc)
* Documentation: [https://medoo.in/doc](https://medoo.in/doc)
19 changes: 10 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "catfan/medoo",
"type": "framework",
"description": "The Lightest PHP database framework to accelerate development",
"keywords": ["database", "lightweight", "PHP framework", "SQL", "MySQL", "MSSQL", "SQLite"],
"homepage": "http://medoo.in",
"description": "The lightest PHP database framework to accelerate development",
"keywords": ["database", "lightweight", "PHP framework", "SQL", "MySQL", "MSSQL", "SQLite", "PostgreSQL", "MariaDB", "Oracle"],
"homepage": "https://medoo.in",
"license": "MIT",
"authors": [
{"name": "Angel Lai", "email": "[email protected]"}
Expand All @@ -13,12 +13,13 @@
"ext-pdo": "*"
},
"suggest": {
"ext-pdo_mysql": "For MySQL or MariaDB databases",
"ext-pdo_sqlsrv": "For MSSQL databases on Windows platform",
"ext-pdo_dblib": "For MSSQL or Sybase databases on Linux/UNIX platform",
"ext-pdo_oci": "For Oracle databases",
"ext-pdo_pqsql": "For PostgreSQL databases",
"ext-pdo_sqlite": "For SQLite databases"
"ext-pdo_mysql": "For MySQL or MariaDB database",
"ext-pdo_sqlsrv": "For MSSQL database on Windows platform",
"ext-pdo_dblib": "For MSSQL or Sybase database on Linux/UNIX platform",
"ext-pdo_oci": "For Oracle database",
"ext-pdo_oci8": "For Oracle version 8 database",
"ext-pdo_pqsql": "For PostgreSQL database",
"ext-pdo_sqlite": "For SQLite database"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit 62b1f34

Please sign in to comment.