Skip to content

Commit 4f04cff

Browse files
authored
Merge pull request #139 from psqlpy-python/support_dbapi
Updated docs
2 parents aed5e35 + 1619e6e commit 4f04cff

File tree

19 files changed

+3143
-1998
lines changed

19 files changed

+3143
-1998
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,8 @@ _load_test
7777

7878
# JS
7979
node_modules
80-
.temp
80+
.temp
81+
node_modules/
82+
docs/.vuepress/.cache/
83+
docs/.vuepress/.temp/
84+
docs/.vuepress/dist/

docs/.vuepress/config.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { defineUserConfig } from "vuepress";
22
import { hopeTheme } from "vuepress-theme-hope";
33
import sidebar from "./sidebar.js";
4-
5-
import { viteBundler } from '@vuepress/bundler-vite'
4+
import { markdownTabPlugin } from '@vuepress/plugin-markdown-tab'
65

76
export default defineUserConfig({
87
lang: "en-US",
98
title: "PSQLPy",
109
description: "PSQLPy Documentation",
1110

12-
bundler: viteBundler(),
11+
// bundler: viteBundler(),
1312

1413
theme: hopeTheme({
1514
repo: "psqlpy-python/psqlpy",
@@ -22,22 +21,20 @@ export default defineUserConfig({
2221

2322
hostname: "https://psqlpy-python.github.io/",
2423

24+
markdown: {
25+
tabs: true,
26+
mermaid: true,
27+
chartjs: true,
28+
},
29+
2530
plugins: {
2631
readingTime: false,
27-
2832
copyCode: {
2933
showInMobile: true,
3034
},
3135

32-
searchPro: {
36+
slimsearch: {
3337
indexContent: true,
34-
autoSuggestions: false,
35-
},
36-
37-
mdEnhance: {
38-
tabs: true,
39-
mermaid: true,
40-
chart: true,
4138
},
4239

4340
sitemap: {

docs/.vuepress/sidebar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default sidebar({
2323
"connection",
2424
"transaction",
2525
"cursor",
26+
"prepared_statement",
2627
"listener",
2728
"results",
2829
"exceptions",

docs/.vuepress/styles/config.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$code-dark-theme: dracula;
2+
$code-light-theme: one-light;
3+
$theme-color: #264934;

docs/.vuepress/styles/index.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// place your custom styles here
2+
.vp-site-name {
3+
visibility: hidden;
4+
}
5+
6+
.vp-hero-info {
7+
img {
8+
max-width: 60% !important;
9+
padding: 1rem;
10+
}
11+
}
12+
13+
.vp-hero-title {
14+
font-size: 3rem;
15+
}
16+
17+
.vp-actions {
18+
align-items: flex-end;
19+
}

docs/.vuepress/styles/palette.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// you can change colors here

docs/.vuepress/theme.ts

Lines changed: 0 additions & 173 deletions
This file was deleted.

docs/benchmarks.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ However, if you have application and database located on different machines, you
2727
## Local Database
2828
::: tabs
2929
@tab Simple Connection Select
30-
::: chart Simple Connection Select
30+
::: chartjs Simple Connection Select
3131

3232
```json
3333
{
@@ -80,7 +80,7 @@ However, if you have application and database located on different machines, you
8080
}
8181
```
8282
@tab Hard Connection Select
83-
::: chart Hard Connection Select
83+
::: chartjs Hard Connection Select
8484

8585
```json
8686
{
@@ -133,7 +133,7 @@ However, if you have application and database located on different machines, you
133133
}
134134
```
135135
@tab Combined Connection Query
136-
::: chart Combined Connection Query
136+
::: chartjs Combined Connection Query
137137

138138
```json
139139
{
@@ -186,7 +186,7 @@ However, if you have application and database located on different machines, you
186186
}
187187
```
188188
@tab Simple Transaction Select
189-
::: chart Simple Transaction Select
189+
::: chartjs Simple Transaction Select
190190

191191
```json
192192
{
@@ -239,7 +239,7 @@ However, if you have application and database located on different machines, you
239239
}
240240
```
241241
@tab Hard Transaction Select
242-
::: chart Hard Transaction Select
242+
::: chartjs Hard Transaction Select
243243

244244
```json
245245
{
@@ -292,7 +292,7 @@ However, if you have application and database located on different machines, you
292292
}
293293
```
294294
@tab Combined Transaction Query
295-
::: chart Combined Transaction Query
295+
::: chartjs Combined Transaction Query
296296

297297
```json
298298
{
@@ -349,7 +349,7 @@ However, if you have application and database located on different machines, you
349349
## External Database
350350
::: tabs
351351
@tab Simple Connection Select
352-
::: chart Simple Connection Select
352+
::: chartjs Simple Connection Select
353353

354354
```json
355355
{
@@ -403,7 +403,7 @@ However, if you have application and database located on different machines, you
403403
```
404404

405405
@tab Hard Connection Select
406-
::: chart Hard Connection Select
406+
::: chartjs Hard Connection Select
407407

408408
```json
409409
{
@@ -457,7 +457,7 @@ However, if you have application and database located on different machines, you
457457
```
458458

459459
@tab Combined Connection Query
460-
::: chart Combined Connection Query
460+
::: chartjs Combined Connection Query
461461

462462
```json
463463
{
@@ -511,7 +511,7 @@ However, if you have application and database located on different machines, you
511511
```
512512

513513
@tab Simple Transaction Select
514-
::: chart Simple Transaction Select
514+
::: chartjs Simple Transaction Select
515515

516516
```json
517517
{
@@ -565,7 +565,7 @@ However, if you have application and database located on different machines, you
565565
```
566566

567567
@tab Hard Transaction Select
568-
::: chart Hard Transaction Select
568+
::: chartjs Hard Transaction Select
569569

570570
```json
571571
{
@@ -619,7 +619,7 @@ However, if you have application and database located on different machines, you
619619
```
620620

621621
@tab Combined Transaction Query
622-
::: chart Combined Transaction Query
622+
::: chartjs Combined Transaction Query
623623

624624
```json
625625
{

docs/components/components_overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ title: Components
55
## Components
66
- `ConnectionPool`: holds connections in itself and give them when requested.
77
- `ConnectionPoolBuilder`: Chainable builder for `ConnectionPool`, for people who prefer it over big initialization.
8-
- `Connection`: represents single database connection, can be retrieved from `ConnectionPool`.
8+
- `Connection`: represents single database connection, can be retrieved from `ConnectionPool` or created with `connect` method.
99
- `Transaction`: represents database transaction, can be made from `Connection`.
10-
- `Cursor`: represents database cursor, can be made from `Transaction`.
10+
- `Cursor`: represents database cursor, can be made from `Connection`, `Transaction` and `PreparedStatement`.
11+
- `PreparedStatement`: represents PostgreSQL prepared statement.
1112
- `Listener`: object to work with [LISTEN](https://www.postgresql.org/docs/current/sql-listen.html)/[NOTIFY](https://www.postgresql.org/docs/current/sql-notify.html) functionality, can be mode from `ConnectionPool`.
1213
- `QueryResult`: represents list of results from database.
1314
- `SingleQueryResult`: represents single result from the database.
1415
- `Exceptions`: we have some custom exceptions.
15-

0 commit comments

Comments
 (0)