A few Typescript and Knex issues
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.3k
- Forks
- 637
- PR merge metrics
- No merged PRs in 30d
Description
Here are some misc things that I think could be changed. I've never written an open source PR before, I think it's easier if an existing contributor changed it:
- Knex supports objects for joins and aggregates. It's especially useful for multi-column joins:
.join(
'foo',
{
'foo.col1': 'bar.col1',
'foo.col2': 'bar.col2',
},
)
Something like this ((table: TableRef<QB>, columns: Record<string, ColumnRef>): QB;) could be added to JoinMethod.
-
Knex's
limitnow supports an additional param "skipBinding" (https://github.com/knex/knex/issues/4805). Objection'sFirstOperationcallslimitwithoutskipBinding, which triggers an error in some databases (Materialize). -
Objection's type exports
UniqueViolationError, but this actually needs to be imported fromdb-errors. -
Objection's Model type doesn't include "propertyNameToColumnName".
-
(not a real issue)
addOperationandKnexOperationaren't documented or exposed through types, but they're useful for new or custom Knex operations.
Thanks for building and maintaining this awesome library!
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
Start by locating the type definitions for JoinMethod and Model, the FirstOperation implementation, and the exports for UniqueViolationError, addOperation, and KnexOperation. Compare each requested change with the referenced Knex behavior and existing Objection types, then verify that the affected exports and type signatures cover all five listed cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100