开发者

javascript autocompletion for DSL. (e.g.: SQL)

开发者 https://www.devze.com 2023-02-03 13:52 出处:网络
I want to give the user a web-page where he can type some simple SQL. select * from myTable. What I would like is to have the autocompletion area to help typing:

I want to give the user a web-page where he can type some simple SQL.

select * from myTable.

What I would like is to have the autocompletion area to help typing:

  • sel
  • [selECT]

  • select * f

  • [select * fROM]

  • select * from

  • [s开发者_JAVA技巧elect * fROM column1]
  • [select * fROM column2]
  • ...

Anybody can suggest if there is a nice open source library for this ?

I am not really interested in the SQL (I will have to parse a DSL) I am more interested on a powerful autocompletion text area widget.


This is a good jQuery auto-completion widget:

  • jQuery/Autocomplete

Or, if you're more apt to hack something together yourself, Ordered list has an excellent write-up using a string matching algorithm ported from the excellent Quicksilver app (for the mac) :

  • Live Search with Quicksilver Style


I have left this unanswered for a while. I am afraid it's fair to saythat there is not an autocompletion widget as described in my question.

0

精彩评论

暂无评论...
验证码 换一张
取 消