Skip to content

Commit e390e44

Browse files
committed
Driver/Dart: Add dedicated page
1 parent 1d3251e commit e390e44

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

docs/_assets/icon/dart-logo.svg

Lines changed: 22 additions & 0 deletions
Loading

docs/connect/dart.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
(connect-dart)=
2+
3+
# Dart
4+
5+
:::{div} sd-text-muted
6+
Connect to CrateDB from Dart applications.
7+
:::
8+
9+
:::{rubric} About
10+
:::
11+
12+
[postgres] is a library for connecting to and querying PostgreSQL databases.
13+
14+
:::{rubric} Synopsis
15+
:::
16+
17+
```dart
18+
final conn = await Connection.openFromUrl(
19+
'postgresql://crate:crate@localhost:5432/?sslmode=disable'
20+
);
21+
22+
final result = await conn.execute("SELECT * FROM sys.summits ORDER BY height DESC LIMIT 10");
23+
print(result[0][0]); // first row and first field
24+
```
25+
26+
27+
[postgres]: https://pub.dev/packages/postgres

docs/connect/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@ CrateDB drivers and adapters for supported programming languages, frameworks, an
4949
:margin: 4 4 0 0
5050
:padding: 0
5151

52+
::::{grid-item-card} Dart
53+
:link: connect-dart
54+
:link-type: ref
55+
:link-alt: Connect to CrateDB using Dart
56+
:padding: 3
57+
:text-align: center
58+
:class-card: sd-pt-3
59+
:class-body: sd-fs-1
60+
:class-title: sd-fs-6
61+
```{image} /_assets/icon/dart-logo.svg
62+
:height: 50px
63+
```
64+
::::
65+
5266
::::{grid-item-card} Java
5367
:link: connect-java
5468
:link-type: ref
@@ -182,6 +196,7 @@ application
182196
:maxdepth: 1
183197
:hidden:
184198
199+
dart
185200
java
186201
javascript
187202
php

0 commit comments

Comments
 (0)