Skip to content

Commit 0b48a7c

Browse files
authored
update doc for special types (#396)
* upadte doc for special types * update start desc
1 parent 47359b8 commit 0b48a7c

File tree

3 files changed

+12
-413
lines changed

3 files changed

+12
-413
lines changed

docs/1_started.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# NebulaGraph Python Client Getting Started
22

33
## Installation
4+
from pypi
45

56
```bash
6-
pip install ng-python # not yet published
7+
pip install nebula5_python==5.2.0
78
```
89

910
from source
1011

1112
```bash
12-
cd python
13+
git clone -b https://github.com/vesoft-inc/nebula-python.git
14+
cd nebula-python
1315
pip install -e .
1416
```
1517

@@ -152,4 +154,4 @@ Run `ngcli --help` to get the help message. An example to connect to NebulaGraph
152154

153155
```bash
154156
ngcli -h 127.0.0.1:9669 -u root -p NebulaGraph01
155-
```
157+
```

docs/5_vector_and_special_types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ cli.close()
5353
### NDuration
5454

5555
`NDuration` represents a duration with support for both month-based and time-based forms.
56-
- If `months != 0`, the instance is month-based (`is_month_based = True`), and `years`/`months` are derived from the `months` argument.
57-
- If `months == 0`, the instance is time-based (days default to 0 in current implementation) and uses the `seconds` and `microseconds` arguments to derive `hour`, `minute`, `second`, `microsec`.
56+
- If `is_month_based = True`, the instance uses `year` and `month` fields for duration representation.
57+
- If `is_month_based = False`, the instance uses `day`, `hour`, `minute`, `second`, and `microsecond` fields for duration representation.
5858

5959
The `__str__` produces an ISO-8601–like string:
6060
- Month-based examples: `P1Y2M`, `P0M`
6161
- Time-based examples: `PT0S`, `PT1H2M3S`, `PT3.5S`, `PT-0.000123S`
6262

6363
API:
64-
- Constructor: `NDuration(seconds: int, microseconds: int, months: int)`
64+
- Constructor: `NDuration(is_month_based: bool, year: int, month: int, day: int, hour: int, minute: int, seconds: int, microseconds: int)`
6565
- Properties/Methods:
6666
- `is_month_based: bool`
6767
- `get_year() -> int`, `get_month() -> int`, `get_day() -> int`

0 commit comments

Comments
 (0)