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

Function onBuild

tests/integration/withGraph.js:2945–2951  ·  view source on GitHub ↗
(builder)

Source from the content-addressed store, hash-verified

2943 )
2944 .context({
2945 onBuild(builder) {
2946 if (builder.modelClass().name === 'Model2') {
2947 builder.orderBy('id_col');
2948 } else {
2949 builder.orderBy('id');
2950 }
2951 },
2952 })
2953 .then(() => {
2954 expect(sql).to.eql([

Callers

nothing calls this directly

Calls 2

orderByMethod · 0.80
modelClassMethod · 0.45

Tested by

no test coverage detected