You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@gravity-ui/websql-autocomplete

Package Overview
Dependencies
Maintainers
0
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gravity-ui/websql-autocomplete

A library that provides autocompletion and errors highlighting for various database dialects

13.10.1
latest
Source
npmnpm
Version published
Weekly downloads
632
-18.13%
Maintainers
0
Weekly downloads
 
Created
Source

WebSQL autocomplete

ci_badge npm_package_version_badge last_commit_badge license_badge

A tool that provides autocompletion for various sql dialects.

Autocomplete theory

In order to parse any language, you need a lexer (tokenizer) and a parser (ast builder)

Resources to research:

How everything works

  • ANTLR4 grammar and lexer for different {dialect} are defined in src/autocomplete/databases/{dialect}/grammar directories.
  • Actual parsers and lexers for different {dialect} are generated into src/autocomplete/databases/{dialect}/generated directories.
  • Dialect specific code, which is required for the core logic to work, is put in src/autocomplete/databases/{dialect}/{dialect}-autocomplete.ts files.
  • The core logic is inside src/autocomplete/shared/autocomplete.ts file. It uses dialect specific helpers to generate autocomplete suggestions based on current cursor position.

How to add a new dialect

Main scripts

  • npm run generate - Generate parsers and lexers (Java has to be installed on your system for this to work)
  • npm run test - Run tests

FAQs

Package last updated on 05 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.