orientechnologies / orientechnologies/orientdb-docs
Python API (Pyorient) a BUG in client.command docs
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 59
- Forks
- 165
- PR merge metrics
- No merged PRs in 30d
Description
official docs example:
...
for sensor in pollen_sensors:
client.command(
"INSERT INTO PollenSensor "
"('device_id', 'read_time', 'read') "
"VALUES('%s', '%s', %s')"
% (sensor.get_id()
time.now(),
sensor.get_data()))
...
but I test it in Python3.7 Pycharm run with Python console, I find ('device_id', 'read_time', 'read') will return error. Only if remove ‘ ’ it will have proper execution.
correct:
...
for sensor in pollen_sensors:
client.command(
"INSERT INTO PollenSensor "
"(device_id, read_time, read) "
"VALUES('%s', '%s', %s')"
% (sensor.get_id()
time.now(),
sensor.get_data()))
...
So maybe the example is wrong.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the official Python API (Pyorient) documentation containing the client.command INSERT example and compare it with the reported Python 3.7 behavior. Verify whether the quoted column names cause the error, then update the example if confirmed and check that the corrected snippet is valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100