Skip to content

Commit f73272f

Browse files
authored
Update docs. (#116)
1 parent 6fe170b commit f73272f

File tree

2 files changed

+85
-8
lines changed

2 files changed

+85
-8
lines changed

docs/api.rst

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ API Documentation
763763

764764
.. note::
765765

766-
This property defaults to ``"edgedb"``
766+
This property defaults to ``"edgedb"``
767767

768768

769769
:property string Password:
@@ -791,7 +791,7 @@ API Documentation
791791

792792
.. note::
793793

794-
Overrides the value provided by Hostname.
794+
Overrides the value provided by Hostname for TLS.
795795

796796

797797
:property int WaitUntilAvailable:
@@ -808,13 +808,90 @@ API Documentation
808808

809809
.. dn:method:: ToString(): string
810810
811+
.. dn:method:: Create(string instance, string dsn, string credentials, string credentialsFile, string host, Int32? port, string database, string branch, string user, string password, string secretKey, string tlsCertificateAuthority, string tlsCertificateAuthorityFile, TLSSecurityMode? tlsSecurity, string tlsServerName, string waitUntilAvailable, Dictionary<string,string> serverSettings): GelConnection
812+
813+
Parses the ``gel.toml``, parameters, and environment variables to
814+
build a :dn:class:`Gel.GelConnection`.
815+
816+
This function will first search for the first valid primary parameters (which can set host/port)
817+
in the following order:
818+
819+
- Primary parameters
820+
- Environment variables
821+
- ``gel.toml`` file
822+
823+
It will then apply any secondary args from the environment variables and options.
824+
825+
If any primary parameters are present, then all environment variables are ignored.
826+
827+
See the `documentation <https://docs.geldata.com/reference/clients/connection>`_ for more information.
828+
829+
:param string instance:
830+
The name of a local instance, remote linked instance, or a Gel Cloud instance. This is a primary parameter.
831+
832+
:param string dsn:
833+
/> A connection URL of the form gel://user:pass@host:port/branch. For a guide to DSNs, see the `DSN Specification <https://docs.geldata.com/reference/reference/dsn#ref-dsn>`_. This is a primary parameter.
834+
835+
:param string credentials:
836+
/> The json representation of the connection. See ``T:Gel.ConnectionCredentials``. Checking in the value of this parameter could present a security risk and is not recommended. This is a primary parameter.
837+
838+
:param string credentialsFile:
839+
/> The path to a json file representing a connection. See ``T:Gel.ConnectionCredentials``. Checking in the credentials file could present a security risk and is not recommended. This is a primary parameter.
840+
841+
:param string host:
842+
/> The hostname of the gel instance to connect to. This is a primary parameter.
843+
844+
:param Nullable<int> port:
845+
/> The port of the gel instance to connect to. This is a primary parameter.
846+
847+
:param string database:
848+
/> The database name to use when connecting. Mutually exclusive with ``Gel.DocGenerator.docMemberSummaryParamref``. This is a secondary parameter.
849+
850+
:param string branch:
851+
/> The branch name to use when connecting. Mutually exclusive with ``Gel.DocGenerator.docMemberSummaryParamref``. This is a secondary parameter.
852+
853+
:param string user:
854+
/> The username used to connect to the database. This is a secondary parameter.
855+
856+
:param string password:
857+
/> The password to connect to the database. This is a secondary parameter.
858+
859+
:param string secretKey:
860+
/> The secret key used to authenticate with cloud instances. This is a secondary parameter.
861+
862+
:param string tlsCertificateAuthority:
863+
/> The TLS Certificate Authority. This is a secondary parameter.
864+
865+
:param string tlsCertificateAuthorityFile:
866+
/> The path to A file which contains the TLS Certificate Authority. This is a secondary parameter.
867+
868+
:param Nullable<TLSSecurityMode> tlsSecurity:
869+
/> The TLS security level. This is a secondary parameter.
870+
871+
:param string tlsServerName:
872+
/> The TLS server name. Overrides the hostname for TLS. This is a secondary parameter.
873+
874+
:param string waitUntilAvailable:
875+
/> The number of miliseconds a client will wait for a connection to be established with the server. This is a secondary parameter.
876+
877+
:param Dictionary<string, string> serverSettings:
878+
/> Additional settings for the server connection. Currently has no effect This is a secondary parameter.
879+
880+
:returns:
881+
882+
A :dn:class:`Gel.GelConnection` class that can be used to connect to a Gel instance.
883+
884+
:throws Gel.ConfigurationException:
885+
An error occured while parsing or configuring the :dn:class:`Gel.GelConnection`.
886+
811887
.. dn:method:: Create(Options options): GelConnection
812888
813-
Parses the ``gel.toml``, optional ``T:Gel.GelConnection.Options``, and environment variables
814-
to build an :dn:class:`Gel.GelConnection`.
889+
Parses the ``gel.toml``, ``T:Gel.GelConnection.Options``, and environment variables
890+
to build a :dn:class:`Gel.GelConnection`.
815891

816892
This function will first search for the first valid primary args (which can set host/port)
817893
in the following order:
894+
818895
- ``T:Gel.GelConnection.Options``
819896
- Environment variables
820897
- ``gel.toml`` file
@@ -824,7 +901,7 @@ API Documentation
824901
If any primary ``T:Gel.GelConnection.Options`` are present, then all environment variables
825902
are ignored.
826903

827-
See the `documentation <https://www.geldata.com/docs/reference/connection>`_ for more information.
904+
See the `documentation <https://docs.geldata.com/reference/clients/connection>`_ for more information.
828905

829906
:param Options options:
830907
Options used to build the :dn:class:`Gel.GelConnection`.

src/Gel.Net.Driver/GelConnection.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,13 @@ public int WaitUntilAvailable
213213
/// <summary>
214214
/// Parses the `gel.toml`, parameters, and environment variables to build a <see cref="GelConnection" />.
215215
///
216-
/// This function will first search for the first valid primary args (which can set host/port)
216+
/// This function will first search for the first valid primary parameters (which can set host/port)
217217
/// in the following order:
218218
/// - Primary parameters
219219
/// - Environment variables
220220
/// - `gel.toml` file
221221
///
222-
/// It will then apply any secondary args from the environment variables and options.
222+
/// It will then apply any secondary parameters from the environment variables and options.
223223
///
224224
/// If any primary parameters are present, then all environment variables are ignored.
225225
///
@@ -505,7 +505,7 @@ Instance is null
505505
}
506506

507507
/// <summary>
508-
/// Parses the `gel.toml`, optional <see cref="Options"/>, and environment variables to build a
508+
/// Parses the `gel.toml`, <see cref="Options"/>, and environment variables to build a
509509
/// <see cref="GelConnection" />.
510510
///
511511
/// This function will first search for the first valid primary args (which can set host/port)

0 commit comments

Comments
 (0)