Skip to content

Commit 78c9471

Browse files
committed
Update README files for by-language examples
1 parent 5f99609 commit 78c9471

File tree

2 files changed

+27
-21
lines changed

2 files changed

+27
-21
lines changed

by-language/csharp-npgsql/README.rst

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
.. highlight: console
22
3-
=================================================================
4-
Basic demonstration program for using CrateDB with vanilla Npgsql
5-
=================================================================
3+
#######################################################
4+
Basic example for connecting to CrateDB using .NET (C#)
5+
#######################################################
6+
7+
8+
*****
9+
About
10+
*****
611

712
CrateDB versions prior to 4.2 needed a custom fork of the official Npgsql .NET
813
data provider for PostgreSQL, `crate-npgsql`_. CrateDB versions 4.2 and later
@@ -12,44 +17,45 @@ The file ``DemoProgram.cs`` is a demonstration program written in C# which
1217
outlines typical, very basic usage scenarios with CrateDB.
1318

1419

20+
21+
*****
1522
Usage
16-
=====
23+
*****
1724

1825
To invoke a CrateDB instance for evaluation purposes, run::
1926

20-
sh$ docker run -it --rm --publish=4200:4200 --publish=5432:5432 crate:4.5.1
27+
docker run -it --rm --publish=4200:4200 --publish=5432:5432 crate:4.5.1
2128

22-
For building and running the demonstration program and connect to
23-
``localhost:5432``, invoke::
29+
Invoke example program::
2430

25-
sh$ dotnet run --framework=net5.0
31+
dotnet run --framework=net5.0
2632

2733
To connect to CrateDB Cloud, use a command like::
2834

29-
sh$ dotnet run --framework=net5.0 -- \
35+
dotnet run --framework=net5.0 -- \
3036
--host=clustername.aks1.westeurope.azure.cratedb.net --ssl-mode=Require \
3137
--username=foobar --password='X8F%Shn)TESTvF5ac7%eW4NM'
3238

3339
Explore all available options::
3440

35-
sh$ dotnet run --framework=net5.0 -- --help
41+
dotnet run --framework=net5.0 -- --help
3642

3743

3844
Tests
3945
=====
4046

4147
For running the test scenarios wrapped into a xUnit test suite, invoke::
4248

43-
sh$ dotnet test --framework=net5.0
49+
dotnet test --framework=net5.0
4450

4551
To generate a Cobertura code coverage report, run::
4652

47-
sh$ dotnet test --framework=net5.0 --collect:"XPlat Code Coverage"
53+
dotnet test --framework=net5.0 --collect:"XPlat Code Coverage"
4854

4955
For running the tests against a remote database, use, for example::
5056

51-
sh$ export CRATEDB_DSN='Host=clustername.aks1.westeurope.azure.cratedb.net;Port=5432;SSL Mode=Require;Username=foobar;Password=X8F%Shn)TESTvF5ac7%eW4NM;Database=testdrive'
52-
sh$ dotnet test --framework=net5.0
57+
export CRATEDB_DSN='Host=clustername.aks1.westeurope.azure.cratedb.net;Port=5432;SSL Mode=Require;Username=foobar;Password=X8F%Shn)TESTvF5ac7%eW4NM;Database=testdrive'
58+
dotnet test --framework=net5.0
5359

5460

5561
.. _crate-npgsql: https://github.com/crate/crate-npgsql

by-language/java-jdbc/README.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. highlight: console
2+
13
##################################################
24
Basic example for connecting to CrateDB using JDBC
35
##################################################
@@ -20,20 +22,18 @@ it makes sense to also have a look at the `PostgreSQL documentation about schema
2022
Usage
2123
*****
2224

23-
Run CrateDB::
25+
To invoke a CrateDB instance for evaluation purposes, run::
2426

25-
docker run -it --rm --publish=4200:4200 --publish=5432:5432 crate/crate:4.6.1
27+
docker run -it --rm --publish=4200:4200 --publish=5432:5432 crate:5.1.1
2628

2729
Create schema and insert data::
2830

2931
psql postgres://crate@localhost:5432/doc
3032

31-
::
33+
.. code-block:: sql
3234
33-
crate=> CREATE TABLE testdrive (id INT PRIMARY KEY, data TEXT);
34-
CREATE 1
35-
crate=> INSERT INTO testdrive VALUES (0, 'zero'), (1, 'one'), (2, 'two');
36-
INSERT 0 3
35+
CREATE TABLE testdrive (id INT PRIMARY KEY, data TEXT);
36+
INSERT INTO testdrive VALUES (0, 'zero'), (1, 'one'), (2, 'two');
3737
3838
Invoke example program::
3939

0 commit comments

Comments
 (0)