sqlline icon indicating copy to clipboard operation
sqlline copied to clipboard

Add jbang alias catalog

Open maxandersen opened this issue 3 years ago • 5 comments

This PR adds a jbang-catalog.json so you can run it directly with jbang using jbang run@julianhyde/sqlline.

alternatively you could also create a julianhyde/jbang-catalog repo and name the alias sqlline and the alias would be jbang sqlline@julianhyde

jbang also has similar support like coursier using the full maven GAV but thought it would be nice just having a direct alias. The advantage of jbang over coursier is that you do not need jbang nor java installed first - jbang init scripts will automatically handle this.

Meaning with this you can with one line be connected to a jdbc database from any environment...windows, osx, linux, container, raspberry pi, etc.

maxandersen avatar Mar 28 '21 09:03 maxandersen

anyone around to give feedback/questions on this PR?

i'm using it from my branch being able to call it from anywhere and do things like:

 jbang --deps io.quarkus:quarkus-jdbc-postgresql:999-SNAPSHOT run@maxandersen/sqlline/jbang -u jdbc:postgresql://localhost:54687/default?loggerLevel=OFF -n quarkus -p quarkus

to connect do local postgres setup by quarkus devservice. would be great to have it under julianhyde/sqlline instead.

thanks for considering it.

maxandersen avatar Aug 28 '21 22:08 maxandersen

no takers or even comment ? :)

maxandersen avatar Feb 28 '23 21:02 maxandersen

No one has asked for jbang to date. If there is demand we may revisit.

julianhyde avatar Mar 01 '23 17:03 julianhyde

Okey; fair enough. Your call.

I just thought since you had coursier which requires scala a java only would be nice to at least have documented.

Would updated PR that just documents jbang as option similar to coursier work? (Would be the same and require more typing by users but effectively the same but pure java and less deps needed)

maxandersen avatar Mar 01 '23 19:03 maxandersen

fyi, made this that makes it even easier to launch sqlline: https://xam.dk/blog/jdbc/

jdbc jdbc:oracle:thin:@myoracle.db.server:1521:my_sid

works for all major known jdbc url formats and url.

maxandersen avatar Nov 02 '23 12:11 maxandersen