Skip to content

Commit

Permalink
port tests and debug; bootstrap composer
Browse files Browse the repository at this point in the history
  • Loading branch information
mindplay-dk committed May 18, 2017
1 parent faade1a commit 87ed651
Show file tree
Hide file tree
Showing 22 changed files with 399 additions and 1,301 deletions.
47 changes: 2 additions & 45 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,45 +1,2 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# JS Maps
**/**.js.map
*.js.map

typings

lib
/vendor
/.idea
46 changes: 0 additions & 46 deletions .vscode/launch.json

This file was deleted.

8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

10 changes: 0 additions & 10 deletions .vscode/tasks.json

This file was deleted.

23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# TSParser / SQL Statement Parser
A simple parser to split multiple statement SQL queries to separated statements for MySQL, PostgreSQL and Microsoft SQL Server
# SQL Statement Splitter

A simple parser to split multiple statement SQL queries to separated statements for MySQL, PostgreSQL and Microsoft SQL Server.

This is an *unofficial* PHP port of [SQL-Statement-Parser by TeamSQL](https://github.com/TeamSQL/SQL-Statement-Parser).

# What does it do and which database engines are supported?
It supports MySQL, PostgreSQL and Microsoft SQL Server. Our parser splits multi-statement SQL queries into single statements.

# Install via npm
It supports MySQL, PostgreSQL and Microsoft SQL Server. Our parser splits multi-statement SQL queries into single statements.

`npm install --save tsparser`
# Install via Composer

# Import TSParser to your project
composer install

`import {TSParser} from 'TSParser'`
# Usage

# TSParser.parse() function description
```
static parse(query: string, dbType: string, delimiter: string): Array<string> {
...
}
```php
// TODO
```

It expects 3 parameters ;
Expand Down
25 changes: 25 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "kodus/sql-splitter",
"description": "A simple parser to split multiple statement SQL queries to seperated statements for MySQL, PostgreSQL and Microsoft SQL Server",
"authors": [
{
"name": "Can Abacigil",
"email": "[email protected]",
"homepage": "https://teamsql.io/",
"role": "Developer of original NPM package"
},
{
"name": "Rasmus Schultz",
"email": "[email protected]",
"role": "Developer of this PHP port"
}
],
"require": {
"mindplay/testies": "^0.3.0"
},
"autoload": {
"psr-4": {
"Kodus\\": "src/"
}
}
}
61 changes: 61 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 0 additions & 48 deletions package.json

This file was deleted.

43 changes: 0 additions & 43 deletions playground.ts

This file was deleted.

Loading

0 comments on commit 87ed651

Please sign in to comment.