MCPcopy
hub / github.com/Vincit/objection.js / onlyFirst

Function onlyFirst

tests/integration/withGraph.js:1227–1231  ·  view source on GitHub ↗
(query)

Source from the content-addressed store, hash-verified

1225 .orderBy('id_col')
1226 .modifiers({
1227 onlyFirst(query) {
1228 query
1229 .orderBy(['model2Id', { column: 'model1Prop1', order: 'desc' }])
1230 .distinctOn('model2Id');
1231 },
1232 });
1233
1234 expect(result).to.eql([

Callers

nothing calls this directly

Calls 2

distinctOnMethod · 0.80
orderByMethod · 0.80

Tested by

no test coverage detected