summaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)Author
2015-06-16Add tests for fuzzy ranking adjustments.Daniel Rocco
2015-05-23Gross test that \dt, \df etc. run without errorDarik Gamble
2015-05-23Support \dT to list datatypesDarik Gamble
2015-05-23Suggest custom types in addition to built-insDarik Gamble
2015-05-23Give pgexecute a datatypes() method to get custom type namesDarik Gamble
Not used yet
2015-05-23Suggest datatypes from a hardcoded whitelistDarik Gamble
2015-05-23Add test to find_prev_keyword for parenthesesDarik Gamble
2015-05-20`drop schema` and `create schema` should suggest schemasDarik Gamble
2015-05-14Fix a typo in the test fixture setup.Amjith Ramanujam
2015-05-11Fix failing tests in Python 2.Amjith Ramanujam
2015-05-02improve suggestions in non-trivial WHERE clausesDarik Gamble
sqlparse groups tokens belonging to the where clause into a single Where token (a subclass of TokenList). In order to handle cases beyond the simplest `SELECT * FROM foo WHERE`, we need to look "inside" of this token list.
2015-05-02improve find_prev_keywordsDarik Gamble
1) Add clarifying comments 2) Fix bug where a keyword inside of a TokenList would result in a ValueError 3) Ignore as keywords a fixed list of logical operators
2015-04-20Implemented external editor call.Iryna Cherniavska
2015-04-18Add suggest tests for INSERT INTO, COPY, UPDATE, DESCRIBE, JOIN, and TRUNCATEDaniel Rocco
2015-04-17Add an extra test for the JOIN USING for good measure.Amjith Ramanujam
2015-04-16Merge pull request #190 from darikg/joinsAmjith Ramanujam
some join-related improvements
2015-04-15Merge pull request #202 from drocco007/feature/match-anywhereAmjith Ramanujam
Completion search text matches user-defined entities anywhere in the name
2015-04-14Merge pull request #195 from darikg/pg_catalogAmjith Ramanujam
Improve handling of pg_catalog in metadata
2015-04-12Completion search text matches user-defined entities anywhere in the nameDaniel Rocco
When searching for completions in smart completion mode, a potential suggestion of a user-specified name (e.g. tables, functions, etc.) is considered a match if the search text appears anywhere in the suggestion. Keywords, special commands, and built-in functions still use startswith matching. Closes #193
2015-04-11Handle a ',' entered before any completions gracefullyDaniel Rocco
Fixes #197
2015-04-09bugfix: don't exclude any schemata from metadata queriesDarik Gamble
2015-04-07support 'JOIN ... USING (' by suggesting columns present in more than one tableDarik Gamble
2015-04-06find_prev_keyword strips everything after the last keywordDarik Gamble
2015-04-06bugfix: extract_tables stopped prematurely on INNER JOIN et alDarik Gamble
check for value.endswith('join') instead of just value == 'join'
2015-04-06bugfix: suggestions were broken after specifying a join typeDarik Gamble
because sqlparse parses things like 'inner join' as a single token, simply checking if token value matches 'join' fails on further specified join types
2015-04-05suggest view namesDarik Gamble
2015-04-05pgexecute supports returning view metadataDarik Gamble
generalize tables() to _relations(relkind_filter), and add convenience methods tables() and views() which simply call _relations() with the appropriate relkind_filter value similarly, generatize columns() to _columns(relkind_filter), and add convenience methods table_columns() and view_columns()
2015-03-25Add a title field and report the notices. Closes #177Amjith Ramanujam
2015-03-11Format Decimal values directly as stringsDaniel Rocco
Closes #169
2015-03-08Merge pull request #170 from darikg/better_dotsAmjith Ramanujam
Better handle schema qualifications in current word
2015-03-06Better handle schema-qualified word_before_cursorDarik Gamble
Previously, if the current word contained a period, `suggest_type` would parse text to the right of the period as `word_before_cursor`, so that characters to the left of the period were parsed as the final token. Then `suggest_based_on_last_token` would generate suggestions under the generic catch-all `elif token_v.endswith('.')`. This means that, for example, `DROP TABLE schema_name.<TAB>` and `DROP FUNCTION schema_name.<TAB>` would each suggest both tables and functions from schema_name. This commit changes this behavior to include schema qualifications as part of word_before_cursor, so that `suggest_based_on_last_token` operates on the actual preceding token, not just the schema name. This allows each token value to handle schema qualifications differently, and now `DROP TABLE schema_name.<TAB>` suggests only tables from schema_name, and the corresponding `DROP FUNCTION` command only functions.
2015-03-01Interpret incoming JSON as a string instead of via json.loadsDaniel Rocco
Closes #163
2015-02-28Watch out for leading whitespaceDarik Gamble
2015-02-27\dn suggests schemas onlyDarik Gamble
2015-02-27\df suggests only schemas and functionsDarik Gamble
2015-02-27Move pgspecial suggestions to separate methodDarik Gamble
2015-02-26Add a test for the special multi-command case.Amjith Ramanujam
2015-02-25Only include special command completions at the start of a statementDaniel Rocco
Closes #159
2015-02-24Add completion for CREATE WITH TEMPLATEDaniel Rocco
Closes #156
2015-02-17Autocomplete function namesDarik Gamble
2015-02-17Store function metadata (not used yet)Darik Gamble
2015-02-08Revert psycopg2cffi to psycopg2.Amjith Ramanujam
2015-02-06Convert to use cffi. But unicode isn't working.Amjith Ramanujam
2015-01-31Add a test for the boolean printing.Amjith Ramanujam
2015-01-30Replace splat import in tests.Amjith Ramanujam
2015-01-30Add a test for the unicode handling in unknown types.Amjith Ramanujam
2015-01-28Fix #106 - autocompletion in multiple statementsdarikg
2015-01-27Fix broken tests.Amjith Ramanujam
2015-01-26Fix \d special command and add some testsDarik Gamble
2015-01-25Split up smart completion tests into two filesDarik Gamble
One file for simple public schema only tests, and another more focused on schema-aware autocompletion