Closed d9k closed 3 years ago
The Documentation says it's a string. The wording is taken from the libpq documentation.
As for examples, take a look at the various .lua files.
Am 24.10.2018 um 12:42 schrieb Dmitry notifications@github.com:
luapgsql.adoc:
connectdb(conninfo) -- ... This function opens a new database connection using the parameters taken from the string conninfo.
It's unclear whether conninfo is structure or string. If it is string please rename it to connectionString. And provide some usage examples please.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/arcapos/luapgsql/issues/53, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaAH5lKo1E-C6z0hZGpglPSALqW442Kks5uoEQggaJpZM4X3ol-.
@mbalmer, ok, it's a URI string
Example:
'postgresql://test:123@127.0.0.1:5432/testdb'
@mbalmer, ok, it's a URI string
It can be.
https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
It could also be a string containing whitespace separated key=value pairs like host=localhost port=5432 dbname=mydb connect_timeout=10
@mbalmer, thanks! It would be great for novice users to know about connection string types from luapgsql documentation
luapgsql.adoc
:It's unclear whether
conninfo
is structure or string. If it only may be the string please rename it toconnectionString
. And provide some usage examples please.