tpope/vim-dadbod

URL regex/format

xpegenaute opened this issue · 1 comments

Hi,

I miss some documentation about the expected URL format or enough examples about it. Actually. I am trying to develop a new adapter and I need an url like this:

dbcompanyname://user:password@host:port/userdbname

I saw that this format is not supported by the db#url#parse because it went directly to the opaque field.

I tried to understand your regexp and propose a modification, but sincerely, I had problems following the regexp expression. Probably because vimscrip is not one of my comfort area languages.

Do you know how I can workaround it ? or at least implement it ?

Regards

The format is supported fine. But port needs to be a number. That's the reason it returns an opaque URL for db#url#parse('dbcompanyname://user:password@host:port/userdbname'). Try db#url#parse('dbcompanyname://user:password@host:1234/userdbname').