Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 02a3003

Browse filesBrowse files
committed
Merge branch 'release-0.1.0'
2 parents 9100268 + b5038b3 commit 02a3003
Copy full SHA for 02a3003

25 files changed

+905
-2
lines changed

‎.babelrc

Copy file name to clipboard
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"presets": [
3+
"env"
4+
],
5+
"env": {
6+
"test": {
7+
"plugins": [
8+
"istanbul"
9+
]
10+
}
11+
}
12+
}

‎.gitignore

Copy file name to clipboard
+84Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# Net beans
61+
nbproject
62+
63+
# Eclipse
64+
.project
65+
.settings
66+
.buildpath
67+
68+
# Composer
69+
vendor
70+
71+
# IntelliJ
72+
.idea
73+
74+
# Lock files
75+
.~lock.*
76+
*.lock
77+
*-lock.json
78+
79+
# Mac Os
80+
.DS_Store
81+
._*
82+
83+
# Generated Distribution Files
84+
web

‎.tern-project

Copy file name to clipboard
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"ecmaVersion": 6,
3+
"libs": [
4+
"chai"
5+
],
6+
"loadEagerly": [],
7+
"dontLoad": [
8+
"node_modules/**"
9+
],
10+
"plugins": {
11+
"doc_comment": true
12+
}
13+
}

‎.travis.yml

Copy file name to clipboard
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: objective-c
2+
# node_js:
3+
# - 8.5.0
4+
#sudo: false
5+
before_install:
6+
- . $HOME/.nvm/nvm.sh
7+
- nvm install 8
8+
- nvm use 8
9+
install:
10+
- npm install
11+
script:
12+
- npm run test
13+
# - 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
14+
branches:
15+
only:
16+
- /^feature.*$/
17+
- /^bugfix.*$/
18+
- develop
19+
- /^hotfix.*$/
20+
- master
21+
notifications:
22+
email:
23+
on_success: never
24+
on_failure: change
25+
after_success:
26+
- npm run coverage
27+
env:
28+
global:
29+
secure: wOzvB9W6nwhtvM3W6KuErkEOVx5caAYPMJlqF8hBU4y6MUuO7EI6g1cp6uwYHCvLP2WjRbpqNBW/hTrP0xo5oHAxNYz7DIXFHfkiCfAAHPtAlh7nR0IxcCtswgsr/Ys6nDzVS7pANyONNo5qkvPmlh1/2WGXxGxTOq+lMyEF2nWlvX6hnQsriKoGDGtB/XY0p+LLdxh2duMqFvrs7UfPgYWT89cZwYJVVTZkGWYNhtrOuWC2Gu3lw7GsrJa2J0OBH87ciXDG66aMTfkjERCLNRbCMKoLgNrnVcO8VSt51svAeN0Qpx8W9+RXLloqTDiFngam1KX9onB3PbJwGZ2mI6UZ07yk/iL49yvnUEXBFRA3Omyrnj/6H80mqq6JEgIWY79mS4jPUAA0Dn6tr6SeUiM8wu6c01/dCaUvCgvMGKHTmgHleQiZRz6IiXKhogMn4d2P2IaSL50Ea0QWuNDWubEhMS7i4RCCN6RLll9HA+XiHjwWJSNOQv8ytrPD8jixG68HNcqe1iXorebIbUG94UXJKNJ2lAdzoiwMQypWmDCZ9FSgBdOMM11UvizBi2h2G1oB1YruAFKbrSFLrgz5QC3KxDzP0m6+fp0CrKp9yDnvZ2r8C0jomz5wPSYGl7xzS5f2VyBBu/QB0L9dgHhgErbO9Af91NgddpHWoha3Vpw=

‎CONTRIBUTORS.md

Copy file name to clipboard
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Contributors
2+
Thank you to all the people who have contributed to this project in any way. The following list of contributors is in alphabetical order.
3+
4+
- [Steven Garcia (@webdevel)](https://github.com/webdevel)

‎README.md

Copy file name to clipboard
+15-2Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
1-
# autocomplete-sql
2-
Autocomplete SQL provider for Atom Autocomplete Plus
1+
# Autocomplete SQL
2+
[![Build Status](https://travis-ci.org/webdevel/autocomplete-sql.svg?branch=master)](https://travis-ci.org/webdevel/autocomplete-sql)
3+
[![Coverage Status](https://coveralls.io/repos/github/webdevel/autocomplete-sql/badge.svg?branch=master)](https://coveralls.io/github/webdevel/autocomplete-sql?branch=master)
4+
5+
*Autocomplete SQL* provider for *[Atom]* *[Autocomplete Plus]*
6+
7+
### Dependencies
8+
*Autocomplete SQL* is an *[Atom]* *[Autocomplete+]* provider and requires *[Autocomplete+]* to be installed. *[Autocomplete+]* is currently bundled with *[Atom]* by default.
9+
10+
### License
11+
*Autocomplete SQL* is Free and Open Source Software. It is licensed by the MIT License.
12+
13+
[Atom]: https://atom.io/
14+
[Autocomplete Plus]: https://github.com/atom/autocomplete-plus
15+
[Autocomplete+]: https://github.com/atom/autocomplete-plus

‎STRUCTURE.md

Copy file name to clipboard
+144Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# SQL Language Structure as it Pertains to Auto-completion
2+
The goal is to determine all parts of a single SQL Statement and hierarchically group the parts to limit the amount of auto-completion suggestions based on the current SQL Statement context.
3+
> Note: This document is somewhat of a scratch-pad and in no way formal
4+
5+
## Statement Hierarchy
6+
- Action
7+
- Clause
8+
- Keyword
9+
- Predicate
10+
11+
## Statement and Parts
12+
Parts in all capitol letters are KEYWORDS, RESERVED WORDS or FUNCTIONS.
13+
- Schema
14+
- ALTER
15+
- DOMAIN
16+
- ROUTINE
17+
- TYPE
18+
- TABLE
19+
- CREATE
20+
- ASSERTION
21+
- CHARACTER SET
22+
- COLLATION
23+
- DOMAIN
24+
- ORDERING
25+
- ROLE
26+
- ROUTINE
27+
- SCHEMA
28+
- TABLE
29+
- TRANSFORM
30+
- TRANSLATION
31+
- TRIGGER
32+
- TYPE
33+
- VIEW
34+
- DROP
35+
- ASSERTION
36+
- CHARACTER SET
37+
- COLLATION
38+
- DOMAIN
39+
- ORDERING
40+
- ROLE
41+
- ROUTINE
42+
- SCHEMA
43+
- TABLE
44+
- TRANSFORM
45+
- TRANSLATION
46+
- TRIGGER
47+
- TYPE
48+
- VIEW
49+
- GRANT
50+
- ROLE
51+
- REVOKE
52+
- Data
53+
- CLOSE
54+
- CURSOR
55+
- DECLARE
56+
- CURSOR
57+
- LOCAL TEMPORARY TABLE
58+
- FETCH
59+
- NEXT
60+
- PRIOR
61+
- FIRST
62+
- LAST
63+
- FREE
64+
- LOCATOR
65+
- HOLD
66+
- LOCATOR
67+
- OPEN
68+
- SELECT
69+
- FROM
70+
- WHERE
71+
- DataChange
72+
- DELETE
73+
- CURSOR
74+
- FROM
75+
- WHERE
76+
- INSERT
77+
- INTO
78+
- UPDATE
79+
- CURSOR
80+
- SET
81+
- WHERE
82+
- Transaction
83+
- COMMIT
84+
- WORK
85+
- RELEASE
86+
- SAVEPOINT
87+
- ROLLBACK
88+
- WORK
89+
- SAVEPOINT
90+
- SET
91+
- TRANSACTION
92+
- CONSTRAINT
93+
- START
94+
- TRANSACTION
95+
- Connection
96+
- CONNECT
97+
- DISCONNECT
98+
- SET
99+
- CONNECTION
100+
- Control
101+
- CALL
102+
- RETURN
103+
- Session
104+
- SET
105+
- ROLE
106+
- SESSION AUTHORIZATION
107+
- SESSION CHARACTERISTICS
108+
- TIME ZONE
109+
- Diagnostic
110+
- GET
111+
- DIAGNOSTICS
112+
- Condition
113+
- Assignment
114+
- Clause
115+
- Expression
116+
- Boolean
117+
- Bit
118+
- Comparison
119+
- Predicate
120+
- Simple
121+
- Literal
122+
- String
123+
- Number
124+
- Identifier
125+
- Database
126+
- Table
127+
- Column
128+
- Function
129+
- Built-in
130+
- Variable
131+
- User
132+
- System
133+
- Subquery
134+
- Match
135+
- Case
136+
- Interval
137+
- SetQuantifier
138+
- DISTINCT
139+
- ALL
140+
141+
### References
142+
[SQL 99 Specification]
143+
144+
[SQL 99 Specification]: http://web.cecs.pdx.edu/~len/sql1999.pdf

‎TODO.md

Copy file name to clipboard
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To Do List
2+
The following list contains features, fixes, improvements and anything that should be done for this project.
3+
4+
- Add Simple Handler which doesn't limit suggestions
5+
- Determine SQL statement structure as it pertains to auto-completion
6+
- Group completions according to determined statement structure
7+
- Determine contexts for each completion group based on
8+
- Current Multi-Line Buffer
9+
- Completion Group
10+
- Scope Descriptor
11+
- Implement Appropriate Handlers
12+
- Strive for 100% code coverage

‎lib/ActionHandler.js

Copy file name to clipboard
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
'use babel'
2+
3+
import Handler from './Handler'
4+
import SuggestionHelper from './SuggestionHelper'
5+
6+
/**
7+
* knows how to perform the operations associated with carrying out a request.
8+
*/
9+
export default class ActionHandler extends Handler {
10+
11+
/* TODO limit the scope of suggestions using the current contexts.
12+
* Determine whether or not to delegate to the successor.
13+
*/
14+
perform(request) {
15+
let {
16+
editor, bufferPosition, scopeDescriptor, prefix,
17+
activatedManually, completions, suggestions, contexts
18+
} = request
19+
SuggestionHelper.append(completions.actions, suggestions)
20+
this.delegate(request)
21+
}
22+
}

‎lib/ContextHandler.js

Copy file name to clipboard
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use babel'
2+
3+
import Handler from './Handler'
4+
5+
/**
6+
* knows how to perform the operations associated with carrying out a request.
7+
*/
8+
export default class ContextHandler extends Handler {
9+
10+
/* TODO Determine and set the contexts based on Current Multi-Line Buffer
11+
*/
12+
perform(request) {
13+
let {
14+
editor, bufferPosition, scopeDescriptor, prefix,
15+
activatedManually, completions, suggestions, contexts
16+
} = request
17+
this.delegate(request)
18+
}
19+
}

‎lib/Factory.js

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use babel'
2+
3+
export default class Factory {
4+
static create(clazz, ...params) {
5+
let instance = new clazz(...params)
6+
return instance
7+
}
8+
}

‎lib/Handler.js

Copy file name to clipboard
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use babel'
2+
3+
/**
4+
* knows how to perform the operations associated with carrying out a request.
5+
*/
6+
export default class Handler {
7+
8+
constructor(successor) {
9+
this.successor = successor
10+
}
11+
perform(request) {
12+
}
13+
delegate(request) {
14+
if (this.successor instanceof Handler) {
15+
this.successor.perform(request)
16+
}
17+
}
18+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.