Improved SQL Typeahead

We’re rebuilt the SQL typeahead with in Zing’s mobile and web apps to be smarter, more useful, and added keyboard shortcuts to make it even faster to write complex queries in Zing – or improve on those generated by Zing’s OpenAI GPT3.5 text to SQL integration.

This new typeahead has:

  • Content-aware suggestions – showing you fields relevant to the table you entered from – or data tables / fields with a shared field name (e.g. those that you might join to)

  • Auto-complete for joins

  • Live validation

  • A preview of all fields and tables to make it easier to know which tables and fields are where

  • Mobile and web support

  • Keyboard shortcuts like tab-to-complete

    Let’s take a closer look at some of these key features and how they can make Zing a powerful tool if you’re writing SQL

Content-aware suggestions

The improved typeahead suggests query fragments based on the context of the SQL statement being written.

For example, if you’re writing a SELECT statement which has a specified a table name, the typeahead will suggest column names that exist in that table as the first option(s) and columns associated with tables which have fields joinable to that table as second options.

This saves time and reduces errors by eliminating irrelevant suggestions.

Secondly, the improved SQL typeahead makes joins simple. Joining tables is a common task in SQL, but it can be tricky to get right. The typeahead now suggests join clauses based on the relationships between tables, so developers don’t have to remember complex syntax. This makes it much easier to write accurate join statements.

Live validation

A ‘warnings / errors’ section automatically validates the syntax and semantics of the SQL, and gives specific row/line pointers to potential issues.

This provides real-time feedback and helps you write SQL that works by highlighting errors before you even run a query.

Table and field preview

All fields in the table(s) you are querying are visible and searchable as you’re creating a query – on the bottom sheet (mobile) or right side (web). This means you don’t need to guess about a field name or which table it is part of – its all visible as you’re creating your query.

Mobile + Web

The improved SQL typeahead works on mobile and web, so SQL development is no longer limited to desktop environments.

The typeahead is responsive, and works seamlessly across devices. This means that developers can write SQL queries on their desktop and edit them on their phone or vice versa, giving the flexibility to work from anywhere.

Tap-to-complete and tab-to-complete

Tab-to-complete (on web) and tap-to-complete (on mobile and web) allows you to complete SQL faster.

Tab-to-complete and arrow key support let you find the relevant field or table without a mouse, and tap-to-complete allows you to tap the field or table names on the right panel to auto-complete them in your SQL query.

This is a small but powerful feature that allows developers to save time and reduce errors by completing SQL statements with a single keystroke. By pressing the tab key, the typeahead completes the current suggestion, automatically filling in the remaining characters.

Take-aways

The improved SQL typeahead saves time, reduces errors, and makes SQL development easier and more efficient.

By being content-aware, making joins simple, offering in-line validation, working on mobile and web, and allowing tab-to-complete, you can quickly write high-quality SQL code, rather than struggling with syntax and semantics.

Related articles

Download Zing For Free

Available on iOS, Android, and the web

Learn how Zing can help you and your organization collaborate with data

Schedule Demo