Giter VIP home page Giter VIP logo

sql-autocomplete's People

Contributors

modeldba avatar mtriff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sql-autocomplete's Issues

Error: Can't resolve 'fs'

When I added the lib to my react project I get the error in my browser console:

./node_modules/.pnpm/[email protected]/node_modules/antlr4ts/misc/InterpreterDataReader.js 17:11-24
Module not found: Error: Can't resolve 'fs' in 'D:\frontend\node_modules\.pnpm\[email protected]\node_modules\antlr4ts\misc'

How to achieve sql column name auto completion?

example: select na from tb1 a left join tb2 b a.code=b.code。
Enter na, how to get the table name: tb1 and tb2, more complex sql, may contain nesting, how to get the corresponding table name, query field information through the table name.

@mtriff The project does not fully implement the modelDBA sqleditor code complete feature.

Bundling with webpack results an increase in the package size

Hi,

Iam only using SQLDialect.PLpgSQL through the following imports
import {SQLAutocomplete, SQLDialect} from "sql-autocomplete";

and using webpack to bundle for production package but it seems the result package include all dialect and even non-used dependencies, please refer to the attached image

antlr

is there anyway to fix this and include only dependencies relevant to my imports

Could not resolve "assert" when installing

I would like to use this library in the browser.

When importing through import { SQLAutocomplete, SQLDialect } from 'sql-autocomplete'
It raises the following error:

> node_modules/antlr4ts/atn/LexerATNSimulator.js:34:23: error: Could not resolve "assert" (use "--platform=node" when building for node)
js     |     34 │ const assert = require("assert");

Is the library meant to work only for node apps? Else, can you please advise. Thanks.

[Question] How do I set up a "DSN"?

Generate valid autocomplete suggestions for keywords, tables, or columns.

The description says table names and columns are also supported, but how do I set up the DSN?

autocomplete("SELECT ") throws error - [RangeError]: token index 1 out of range 0..0

Hello. Thanks for your package. Unfortunately, I have not been able to use it yet.

"RangeError]: token index 1 out of range 0..0" occurs when a space is encountered in sql string. Well, let's look at an example.
Codesandbox

String "SELECT" works fine.
String "SELECT " throws an exception like RangeError: token index 1 out of range 0..0.

Your examples from the readme file also do not work, but when I cloned the repository and ran the tests, they all succeeded.

Could you please shed some light on this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.