deep-foundation / deep-foundation/deeplinks
`deep.insert` inconsistent API to insert a link with a number value in plv8 handler
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
# Expected:
```js
deep.insert({
type_id: ...,
number: {data: {value: timestamp}}
});
```
# Actual:
```js
deep.insert({
type_id: ...,
number: timestamp
});
```
# Error
```
invalid input syntax for type bigint: "[object Object]"
```
# Incosistent API
The way I insert a link with a string value:
```js
const {data: [{id: logInsertId}]} = deep.insert({
type_id: deep.id("${PACKAGE_NAME}", "LogInsert"),
from_id: logLinkId,
to_id: newLink.id,
string: {data: {value: timestamp}}
});
```
Insertion with string value behavior is the same as in docker async handlers
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the plv8 handler's deep.insert entry point and trace how number links are converted before PostgreSQL receives them. Compare that path with the shown string-link insertion; done means number links accept the documented data.value shape without the bigint conversion error while string insertion remains compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, postgresql
- Domain
- api, backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100