Skip to content

Commit d044313

Browse files
committed
Cloud connection page
1 parent 4d65524 commit d044313

File tree

4 files changed

+107
-6
lines changed

4 files changed

+107
-6
lines changed

drivers/modules/ROOT/partials/tutorials/java/src/main/java/org/example2/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private static TypeDBDriver connectToTypeDB(Edition edition, String uri, String
8585
};
8686
if (edition == Edition.CLOUD) {
8787
// tag::driver_new_cloud[]
88-
Driver driver = TypeDB.cloudDrive(Set.of(uri), new Credentials(username, password), new DriverOptions(false, null));
88+
Driver driver = TypeDB.cloudDriver(Set.of(uri), new Credentials(username, password), new DriverOptions(false, null));
8989
// end::driver_new_cloud[]
9090
return driver;
9191
};

drivers/modules/ROOT/partials/tutorials/python/sample.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ def connect_to_TypeDB(edition, uri, username=USERNAME, password=PASSWORD):
238238
# end::driver_new_core[]
239239
return driver
240240
if edition is Edition.Cloud:
241-
# tag::driver_new_cloud
241+
# tag::driver_new_cloud[]
242242
driver = TypeDB.cloud_driver([uri], Credentials(username, password), DriverOptions(False, None))
243-
# end::driver_new_cloud
243+
# end::driver_new_cloud[]
244244
return driver
245245

246246

manual/modules/ROOT/pages/connect/CE.adoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,3 @@ Coming soon!
102102
103103
--
104104
====
105-
106-
After connecting to TypeDB Core, see how to xref:connecting/database.adoc[create a database] and use
107-
xref:queries/transactions.adoc[transactions].
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,105 @@
11
= TypeDB Cloud
2+
3+
// TODO: add cloud link somewhere
4+
5+
Connecting to TypeDB Cloud requires:
6+
7+
* `address` and `port` of the server - these can be found on the page for your cluster
8+
* a valid `username` and `password` - you should have set the password for the `admin` user while setting up your cluster
9+
10+
[tabs]
11+
====
12+
Studio::
13+
+
14+
--
15+
// TODO: re-add
16+
// Run Studio and follow instructions below:
17+
//
18+
// include::../setup/studio.adoc[tag=connect_cloud_studio]
19+
--
20+
21+
Console::
22+
+
23+
--
24+
// Run Console using the `--core` argument to set the address and port to connect to:
25+
//
26+
// include::../setup/console.adoc[tag=connect_cloud_console]
27+
--
28+
====
29+
30+
For programmatic access, use one of the TypeDB xref:{page-component-version}@drivers::overview.adoc[drivers] via the network API:
31+
32+
[tabs]
33+
====
34+
Rust::
35+
+
36+
--
37+
[,rust,indent=0]
38+
----
39+
let uri = format!("{}:{}", address, port);
40+
include::{page-version}@drivers::partial$tutorials/rust/src/main.rs[tags=driver_new_cloud]
41+
----
42+
43+
--
44+
45+
Python::
46+
+
47+
--
48+
[,python,indent=0]
49+
----
50+
uri = f"{address}:{port}"
51+
include::{page-version}@drivers::partial$tutorials/python/sample.py[tags=driver_new_cloud]
52+
----
53+
//include::partial$python-manual-code.py[tags=driver]
54+
--
55+
56+
Java::
57+
+
58+
--
59+
[,java,indent=0]
60+
----
61+
uri = String.format("%s:%s", address, port)
62+
include::{page-version}@drivers::partial$tutorials/java/src/main/java/org/example2/Main.java[tags=driver_new_cloud]
63+
----
64+
65+
--
66+
67+
Node.js::
68+
+
69+
--
70+
[,js,indent=0]
71+
----
72+
Coming soon!
73+
----
74+
--
75+
76+
C#::
77+
+
78+
--
79+
[,csharp,indent=0]
80+
----
81+
Coming soon!
82+
----
83+
84+
--
85+
86+
C++::
87+
+
88+
--
89+
[,cpp,indent=0]
90+
----
91+
Coming soon!
92+
----
93+
94+
--
95+
96+
C::
97+
+
98+
--
99+
[,c,indent=0]
100+
----
101+
Coming soon!
102+
----
103+
104+
--
105+
====

0 commit comments

Comments
 (0)