All Projects β†’ DavidLGoldberg β†’ Qolor

DavidLGoldberg / Qolor

Licence: mit
An atom package to color your queries!

Programming Languages

coffeescript
4710 projects

Projects that are alternatives of or similar to Qolor

Join Monster
A GraphQL to SQL query execution layer for query planning and batch data fetching.
Stars: ✭ 2,395 (+13205.56%)
Mutual labels:  sql, sql-query
chalk
πŸ–οΈπŸŽ¨Composable and simple terminal highlighting package for OCaml.
Stars: ✭ 29 (+61.11%)
Mutual labels:  color, highlight
ChromaTerm
Color your Terminal with RegEx!
Stars: ✭ 149 (+727.78%)
Mutual labels:  color, highlight
Sql Template Tag
ES2015 tagged template string for preparing SQL statements, works with `pg` and `mysql`
Stars: ✭ 132 (+633.33%)
Mutual labels:  sql, sql-query
Kyuubi
Kyuubi is a unified multi-tenant JDBC interface for large-scale data processing and analytics, built on top of Apache Spark
Stars: ✭ 363 (+1916.67%)
Mutual labels:  sql, sql-query
Querybuilder
SQL query builder, written in c#, helps you build complex queries easily, supports SqlServer, MySql, PostgreSql, Oracle, Sqlite and Firebird
Stars: ✭ 2,111 (+11627.78%)
Mutual labels:  sql, sql-query
nord-atom-syntax
An arctic, north-bluish clean and elegant Atom syntax theme.
Stars: ✭ 72 (+300%)
Mutual labels:  atom, color
Deveeldb
DeveelDB is a complete SQL database system, primarly developed for .NET/Mono frameworks
Stars: ✭ 80 (+344.44%)
Mutual labels:  sql, sql-query
Sql Parser
A validating SQL lexer and parser with a focus on MySQL dialect.
Stars: ✭ 284 (+1477.78%)
Mutual labels:  sql, sql-query
Dataux
Federated mysql compatible proxy to elasticsearch, mongo, cassandra, big-table, google datastore
Stars: ✭ 268 (+1388.89%)
Mutual labels:  sql, sql-query
Tableqa
AI Tool for querying natural language on tabular data.
Stars: ✭ 109 (+505.56%)
Mutual labels:  sql, sql-query
Jooq
jOOQ is the best way to write SQL in Java
Stars: ✭ 4,695 (+25983.33%)
Mutual labels:  sql, sql-query
Postguard
πŸ› Statically validate Postgres SQL queries in JS / TS code and derive schemas.
Stars: ✭ 104 (+477.78%)
Mutual labels:  sql, sql-query
Sublimetext Sqltools
SQLTools for Sublime Text 3
Stars: ✭ 166 (+822.22%)
Mutual labels:  sql, sql-query
Minisqlquery
Minimalist SQL Query tool for any .NET DB Provider - SQL, SQLite, SQL CE, Oracle, Access...
Stars: ✭ 103 (+472.22%)
Mutual labels:  sql, sql-query
colocat
Fegeya Colocat, Colorized 'cat' implementation. Written in C++17.
Stars: ✭ 14 (-22.22%)
Mutual labels:  color, highlight
Squid
πŸ¦‘ Provides SQL tagged template strings and schema definition functions.
Stars: ✭ 57 (+216.67%)
Mutual labels:  sql, sql-query
Reporting Services Examples
πŸ“• Various example reports I use for SQL Server Reporting Services (SSRS) as well as documents for unit testing, requirements and a style guide template.
Stars: ✭ 63 (+250%)
Mutual labels:  sql, sql-query
texthighlighter
a no dependency typescript npm package for highlighting user selected text
Stars: ✭ 17 (-5.56%)
Mutual labels:  color, highlight
Jet
Type safe SQL builder with code generation and automatic query result data mapping
Stars: ✭ 373 (+1972.22%)
Mutual labels:  sql, sql-query

Qolor

Join the chat at https://gitter.im/qolor-atom/Lobby Build Status

An atom package to color your SQL queries!

Qolor applies semantic highlighting to your SQL queries by matching tables to their aliases.

Qolor in action!

All colors of tables are deterministic and based on their name. They will be the same on any Atom editor anywhere!

Qolor has a few outstanding issues but it's usable and I want to launch it in the spirit of MVP. I say it's usable because it doesn't throw errors or pop up the inspector. If you see it doing this please report ASAP. Please feel free to create issues of broken coloring cases with screen shots or text samples (remember to check out the TODO below and the open issues).

Installation

apm install qolor

Settings

Two stylistic flavors. Underline (default) or a border box. The border box is more of a placeholder for now. I only built it to facilitate pull requests etc.

Optional Keymap To Toggle

Go to Atom -> Open Your Keymap and enter the following:

'atom-workspace':
  'ctrl-alt-q': 'qolor:toggle'

# Careful, don't override your existing 'atom-workspace'!

How to Auto Associate File Types in Atom

Go to Atom -> 'Init Script...' and add in:

# This example associates all mustache files with 'SQL (Mustache)'.
atom.workspace.observeTextEditors (editor) ->
  if editor.getPath()?.match(/\.mustache$/)
    editor.setGrammar(atom.grammars.grammarForScopeName('source.sql.mustache'))

Prior Art / Related Works

I got the idea for Qolor while working with a large query. We all play a frustrating game of connect the dots while mentally parsing ("grokking") aliases to their tables. Colors can help you hunt down the aliases.

Later a friend pointed out that a lot of related work in the area of "semantic highligting" already exists! Although, I have yet to find one that does this semantic highlighting for SQL in this table to alias manner. Let me know if it does!

Here are some of the related links:

How it works

Qolor uses the language-sql grammar built into Atom (actually it evolved from textmate/sublime). The code performs a double pass. First pass for the table names and second pass for the aliases.

I don't know of any SQL parsers in node usable for this project.

The code is ugly. language-sql suffices for syntax coloring, but it's tokens aren't always accurate. I try to make a layer of rules on top.

It should work for most cases, but please report any issues.

Your performance should be unaffected because qolor utilizes the debounced api for observing the grammar and because well, computers are fast.

TODO

  • [BUG] Cartesian products / cross joins don't work. They are particularly troublesome without aliases. This is due to existing limitations in the language-sql grammar. I have an idea of how to address this but prefer to see if anyone has a suggestion of how to integrate a real parser.

  • Custom styling of underline / border.

  • Better handling of colors. Possibly hue blending etc. Leverage theme information. I still want these to be deterministic but for example, perhaps a marginal shift of the colors to play nicely with the themes. Pull requests?

  • Jump to and from matching tables and aliases under cursor.

  • List number of references in the status bar.

  • Add qolor to the minimap.

  • Stats report of all tables or projected fields. Maybe visual like a minimap? Query execution plans etc.

  • Some treatment of matching or applicable fields names?

My other Atom package :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].