PHPackages                             vimac/myspot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. vimac/myspot

ActiveLibrary[Database &amp; ORM](/categories/database)

vimac/myspot
============

A simple PHP persistence framework based on PDO with sql map support

v0.1.1(5y ago)1521MITPHPPHP &gt;=7.1

Since Feb 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/vimac/myspot)[ Packagist](https://packagist.org/packages/vimac/myspot)[ Docs](https://github.com/vimac/spot)[ RSS](/packages/vimac-myspot/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

MySpot
======

[](#myspot)

**[中文版读我 / Readme in Chinese](README.zh.md)**

[![PHP from Packagist](https://camo.githubusercontent.com/215b0d666f216d689616bff64fd774607e0143d27cb2cf0326973c2fbd58060f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f76696d61632f6d7973706f743f636f6c6f723d253233383539334243266c6f676f3d706870)](https://camo.githubusercontent.com/215b0d666f216d689616bff64fd774607e0143d27cb2cf0326973c2fbd58060f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f76696d61632f6d7973706f743f636f6c6f723d253233383539334243266c6f676f3d706870) [![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE) [![Build Status](https://camo.githubusercontent.com/adc58d2bb79220743674de25e246912b8aef1dbd17f64729732a760fda43377b/68747470733a2f2f7472617669732d63692e6f72672f76696d61632f6d7973706f742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vimac/myspot) [![Coverage Status](https://camo.githubusercontent.com/50e41981c567eb123bf701b9b25b312b9bfda478fd9f4529cf70c576fba05a59/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f76696d61632f6d7973706f742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/vimac/myspot?branch=master)

| [Why](#why) | [Features](#features) | [Requirements](#requirements) | [Demo Project](#demo-project) | [Installation](#installation) | [Usage](#usage) | [Tests](#tests) | [License](#license) | [About Me](#about-me) |

A PHP persistence framework based on PDO with sql map support.

Think this as a PHP lightweight alternative implementation of MyBatis.

It should be helpful when you write business database access code in PHP project.

Why?
----

[](#why)

PHP is my first choice when I decide to build something fast.

But data access code bothers me every time, so I decided to open this project.

Inspired by a simple data access library which is a part of a framework named "IRON", a proprietary library be used by a company named Youzan I worked for once. It's a great company, salute to the engineers in there.

(Sure, no code in this project comes from that "IRON" framework.)

Features
--------

[](#features)

- A visual utility to generate the code of Data Access Object class file and configuration file, check out [iCopyPaste](https://github.com/vimac/iCopyPaste)
- A simple syntax support for simple condition sub statement
- A simple syntax support for SELECT..IN query which is poor in PDO
- Lightweight, all configuration stored in PHP native array

Requirements
------------

[](#requirements)

- PHP 7.3+
- PHP PDO extension with proper database driver, MySQL or Sqlite recommend
- PHP JSON extension

Demo Project
------------

[](#demo-project)

See MySpot action in a project:

[MySpot-Demo-Application](https://github.com/vimac/myspot-demo-app)

Installation
------------

[](#installation)

```
composer require vimac/myspot
```

Usage
-----

[](#usage)

#### GUI Utility

[](#gui-utility)

[![iCopyPaste Snapshot](https://github.com/vimac/iCopyPaste/raw/master/snapshot.png)](https://github.com/vimac/iCopyPaste)

You can use [iCopyPaste](https://github.com/vimac/iCopyPaste) to generate variants of basic queries, configuration template, DAO code template.

Downloads: [iCopyPaste Release Page](https://github.com/vimac/iCopyPaste/releases)

#### Initialize

[](#initialize)

```
