-
Notifications
You must be signed in to change notification settings - Fork 72
TypeDB Core Concepts #958
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
TypeDB Core Concepts #958
Changes from all commits
2416ab5
4f5f19e
e509fc0
2e13da7
c23226f
b56cd61
f276e66
391729b
acfe75f
7a30e8e
b33f8a7
7b8bb13
87ddb28
10cf370
cd6a39a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does this page exist here, given we have:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm honestly not sure. I don't think there's much to the concept of connections I can cover, so I just gave quickstart-level instructions to connect. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,135 @@ | ||
= Connections | ||
|
||
[placeholder] | ||
Managing connections in TypeDB server. | ||
== Overview | ||
|
||
To interact with a TypeDB database, a client application must first establish a connection to the server. This is typically done using a | ||
xref:{page-version}@new_core_concepts::drivers/index.adoc[TypeDB driver] for your chosen programming language (e.g., Python, Java, Rust, Node.js) or through a tool like the TypeDB Console or TypeDB Studio. | ||
|
||
A connection requires the server's address (host and port) and valid user credentials. For production environments, a secure connection using | ||
TLS is strongly recommended. | ||
|
||
== Connecting to TypeDB Cloud & Enterprise | ||
|
||
[tabs] | ||
==== | ||
Studio:: | ||
+ | ||
-- | ||
For a cloud deployment: | ||
|
||
// include::../tools/studio.adoc[tag=connect_cloud_studio] | ||
. In the https://cloud.typedb.com[TypeDB Cloud website], navigate to your cluster and click *Connect*. Then, click *Connect with TypeDB Studio*. This will launch TypeDB Studio. | ||
. Fill in your password and hit *Connect*. Your password can be found in your downloaded credentials file (if you have one). | ||
|
||
For an enterprise deployment: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How come enterprise and not CE? Why does a cluster have a single address? |
||
|
||
// include::../tools/studio.adoc[tag=connect_enterprise_studio] | ||
. Launch TypeDB Studio. | ||
. Enter the address of the HTTP endpoint of your cluster. By default, this is at port 8000. | ||
. Enter your username and password. | ||
. Click `Connect`. | ||
-- | ||
Console:: | ||
+ | ||
-- | ||
Run Console in CLI: | ||
|
||
//include::../tools/console.adoc[tag=connect_console] | ||
.Connect to TypeDB | ||
[source,console] | ||
---- | ||
typedb console --address=<server-address> --username=<username> | ||
---- | ||
|
||
You will be prompted for a password. | ||
-- | ||
|
||
Comment on lines
+11
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why bother at all here when they have there dedicated pages under |
||
==== | ||
|
||
== Connecting your application | ||
|
||
For programmatic access, use one of the TypeDB xref:{page-component-version}@drivers::overview.adoc[drivers] via the network API: | ||
|
||
[tabs] | ||
==== | ||
Rust:: | ||
+ | ||
-- | ||
[,rust,indent=0] | ||
---- | ||
let uri = format!("{}:{}", address, port); | ||
include::{page-version}@drivers::partial$tutorials/rust/src/main.rs[tags=driver_new] | ||
---- | ||
|
||
-- | ||
|
||
Python:: | ||
+ | ||
-- | ||
[,python,indent=0] | ||
---- | ||
uri = f"{address}:{port}" | ||
include::{page-version}@drivers::partial$tutorials/python/sample.py[tags=driver_new] | ||
---- | ||
-- | ||
==== | ||
|
||
== Connecting to TypeDB Community Edition | ||
|
||
[tabs] | ||
==== | ||
Console:: | ||
+ | ||
-- | ||
Run Console in CLI: | ||
|
||
//include::../tools/console.adoc[tag=connect_console] | ||
.Connect to TypeDB | ||
[source,console] | ||
---- | ||
typedb console --address=<server-address> --username=<username> --tls-disabled | ||
---- | ||
|
||
You will be prompted for a password. | ||
|
||
TypeDB CE does not support encryption. Use `--tls-disabled` to connect without using TLS. | ||
-- | ||
|
||
Studio:: | ||
+ | ||
-- | ||
// include::../tools/studio.adoc[tag=connect_ce_studio] | ||
. Launch TypeDB Studio. | ||
. Enter the address of the HTTP endpoint of your cluster. By default, this is at port 8000 and for local instances you can use `http://localhost:8000`. | ||
. Enter your username and password - defaults are `admin` and `password`. | ||
. Click `Connect`. | ||
-- | ||
==== | ||
|
||
== Connecting your application | ||
|
||
For programmatic access, use one of the TypeDB xref:{page-component-version}@drivers::overview.adoc[drivers] via the network API: | ||
|
||
[tabs] | ||
==== | ||
Rust:: | ||
+ | ||
-- | ||
[,rust,indent=0] | ||
---- | ||
let uri = format!("{}:{}", address, port); | ||
include::{page-version}@drivers::partial$tutorials/rust/src/main.rs[tags=driver_new] | ||
---- | ||
|
||
-- | ||
|
||
Python:: | ||
+ | ||
-- | ||
[,python,indent=0] | ||
---- | ||
uri = f"{address}:{port}" | ||
include::{page-version}@drivers::partial$tutorials/python/sample.py[tags=driver_new] | ||
---- | ||
-- | ||
==== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange place to have it. Why not add it in the beginning