Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jbang alias catalog #430

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

maxandersen
Copy link

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
Copy link
Author

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
Copy link
Author

no takers or even comment ? :)

@julianhyde
Copy link
Owner

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

@maxandersen
Copy link
Author

maxandersen commented Mar 1, 2023

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants