Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23ce2af

Browse files
committed
remove deprecated methods
1 parent 7c8a282 commit 23ce2af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+963
-2538
lines changed

doc/api/model/instance-methods.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -503,14 +503,6 @@ class Person extends Model {
503503
}
504504
```
505505

506-
## $afterGet()
507-
508-
::: warning
509-
Deprecated! Will be removed in version 3.0. Use [\$afterFind](#afterfind) instead.
510-
511-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/model/instance-methods.md#afterget)
512-
:::
513-
514506
## $afterFind()
515507

516508
```js
@@ -912,14 +904,6 @@ child1 = person.children[person.children.length - 1];
912904
child2 = person.children[person.children.length - 2];
913905
```
914906

915-
## $loadRelated()
916-
917-
::: warning
918-
Deprecated! Will be removed in version 3.0. Use [\$fetchGraph](#fetchgraph) instead.
919-
920-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/model/instance-methods.md#loadrelated)
921-
:::
922-
923907
## $fetchGraph()
924908

925909
```js

doc/api/model/static-methods.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -885,14 +885,6 @@ Creates an error thrown when validation fails for a model. You can override this
885885
| ------- | ----------------------------------------------------------------------------------- |
886886
| `Error` | The created error. [ValidationError](/api/types/#class-validationerror) by default. |
887887

888-
## `static` loadRelated()
889-
890-
::: warning
891-
Deprecated! Will be removed in version 3.0. Use [fetchGraph](#static-fetchgraph) instead.
892-
893-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/model/static-methods.md#static-loadrelated)
894-
:::
895-
896888
## `static` fetchGraph()
897889

898890
```js

doc/api/model/static-properties.md

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -293,16 +293,6 @@ Person.query()
293293
.modifyGraph('pets', 'dogs');
294294
```
295295

296-
## `static` namedFilters
297-
298-
::: warning
299-
Deprecated! Will be removed in version 3.0. Use [modifiers](/api/model/static-properties.html#static-modifiers) instead.
300-
301-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/model/static-properties.md#static-namedfilters)
302-
:::
303-
304-
An alias for [modifiers](/api/model/static-properties.html#static-modifiers)
305-
306296
## `static` modelPaths
307297

308298
```js
@@ -450,42 +440,6 @@ class Person extends Model {
450440
}
451441
```
452442

453-
## `static` relatedFindQueryMutates
454-
455-
::: warning
456-
Deprecated! Will be removed in version 3.0.
457-
458-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/model/static-properties.md#static-relatedfindquerymutates)
459-
:::
460-
461-
```js
462-
class Person extends Model {
463-
static get relatedFindQueryMutates() {
464-
return false;
465-
}
466-
}
467-
```
468-
469-
If this config is set to false, calling `foo.$relatedQuery('bar')` doesn't assign the fetched related models to `foo.bar`. The default is false.
470-
471-
## `static` relatedInsertQueryMutates
472-
473-
::: warning
474-
Deprecated! Will be removed in version 3.0.
475-
476-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/model/static-properties.md#static-relatedinsertquerymutates)
477-
:::
478-
479-
```js
480-
class Person extends Model {
481-
static get relatedInsertQueryMutates() {
482-
return false;
483-
}
484-
}
485-
```
486-
487-
If this config is set to false, calling `foo.$relatedQuery('bar').insert(obj)` doesn't append the inserted related model to `foo.bar`. The default is false.
488-
489443
## `static` uidProp
490444

491445
```js
@@ -562,22 +516,6 @@ If this is true only properties in `jsonSchema` are picked when inserting or upd
562516

563517
Defaults to false.
564518

565-
## `static` defaultEagerAlgorithm
566-
567-
::: warning
568-
Deprecated! Will be removed in version 3.0. Use [withGraphFetched](/api/query-builder/eager-methods.html#withgraphfetched) or [withGraphJoined](/api/query-builder/eager-methods.html#withgraphjoined) explicitly.
569-
570-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/model/static-properties.md#static-defaulteageralgorithm)
571-
:::
572-
573-
## `static` defaultEagerOptions
574-
575-
::: warning
576-
Deprecated! Will be removed in version 3.0. Use `defaultGraphOptions` instead.
577-
578-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/model/static-properties.md#static-defaulteageroptions)
579-
:::
580-
581519
## `static` defaultGraphOptions
582520

583521
```js

doc/api/objection/README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,6 @@ await Person
179179
}));
180180
```
181181

182-
## lit
183-
184-
::: warning
185-
Deprecated! Will be removed in 3.0. Use [val](#val) instead.
186-
187-
[v1 documentation](https://github.com/Vincit/objection.js/tree/v1/doc/api/objection#lit)
188-
:::
189-
190182
## val
191183

192184
```js

doc/api/query-builder/eager-methods.md

Lines changed: 1 addition & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -264,78 +264,6 @@ const people = await Person.query()
264264
.where('persons.id', '>', 100);
265265
```
266266

267-
## eager()
268-
269-
::: warning
270-
Deprecated! Will be removed in version 3.0. Use [withGraphFetched](/api/query-builder/eager-methods.html#withgraphfetched) or [withGraphJoined](/api/query-builder/eager-methods.html#withgraphjoined) instead.
271-
272-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#eager)
273-
:::
274-
275-
## eagerAlgorithm()
276-
277-
::: warning
278-
Deprecated! Will be removed in version 3.0. Use [withGraphFetched](/api/query-builder/eager-methods.html#withgraphfetched) or [withGraphJoined](/api/query-builder/eager-methods.html#withgraphjoined) instead.
279-
280-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#eageralgorithm)
281-
:::
282-
283-
## eagerOptions()
284-
285-
::: warning
286-
Deprecated! Will be removed in version 3.0. Use [withGraphFetched](/api/query-builder/eager-methods.html#withgraphfetched) or [withGraphJoined](/api/query-builder/eager-methods.html#withgraphjoined) instead. You can pass options as the second argument for both methods.
287-
288-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#eageroptions)
289-
:::
290-
291-
## joinEager()
292-
293-
::: warning
294-
Deprecated! Will be removed in version 3.0. Use [withGraphJoined](/api/query-builder/eager-methods.html#withgraphjoined) instead.
295-
296-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#joineager)
297-
:::
298-
299-
## naiveEager()
300-
301-
::: warning
302-
Deprecated! Will be removed in version 3.0. Use [withGraphFetched](/api/query-builder/eager-methods.html#withgraphfetched) instead with [maxBatchSize: 1](/api/types/#type-graphoptions) option.
303-
304-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#naiveeager)
305-
:::
306-
307-
## mergeEager()
308-
309-
::: warning
310-
Deprecated! Will be removed in version 3.0. Use [withGraphFetched](/api/query-builder/eager-methods.html#withgraphfetched) or [withGraphJoined](/api/query-builder/eager-methods.html#withgraphjoined) instead. They merge the graphs by default.
311-
312-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#mergeeager)
313-
:::
314-
315-
## mergeJoinEager()
316-
317-
::: warning
318-
Deprecated! Will be removed in version 3.0. Use [withGraphFetched](/api/query-builder/eager-methods.html#withgraphfetched) or [withGraphJoined](/api/query-builder/eager-methods.html#withgraphjoined) instead. They merge the graphs by default.
319-
320-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#mergejoineager)
321-
:::
322-
323-
## mergeNaiveEager()
324-
325-
::: warning
326-
Deprecated! Will be removed in version 3.0. Use [withGraphFetched](/api/query-builder/eager-methods.html#withgraphfetched) or [withGraphJoined](/api/query-builder/eager-methods.html#withgraphjoined) instead. They merge the graphs by default.
327-
328-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#mergenaiveeager)
329-
:::
330-
331-
## eagerObject()
332-
333-
::: warning
334-
Deprecated! Will be removed in version 3.0. Use [graphExpressionObject](#graphexpressionobject) without arguments instead.
335-
336-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#eagerobject)
337-
:::
338-
339267
## graphExpressionObject()
340268

341269
```js
@@ -360,20 +288,6 @@ See [this section](/api/types/#relationexpression-object-notation) for more exam
360288
| ------ | ------------------------------------------------------------------------------------------------------------------ |
361289
| object | Object representation of the current relation expression passed to either `withGraphFetched` or `withGraphJoined`. |
362290

363-
## eagerModifiers()
364-
365-
::: warning
366-
Deprecated! Will be removed in version 3.0. Use [modifiers](/api/query-builder/other-methods.html#modifiers) without arguments instead.
367-
368-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#eagermodifiers)
369-
:::
370-
371-
##### Return value
372-
373-
| Type | Description |
374-
| ------ | ----------------------------- |
375-
| object | Eager modifiers of the query. |
376-
377291
## allowGraph()
378292

379293
```js
@@ -490,30 +404,6 @@ Clears all calls to `allowGraph`.
490404

491405
Clears all calls to `withGraphFetched` and `withGraphJoined`.
492406

493-
## allowEager()
494-
495-
::: warning
496-
Deprecated! Will be removed in version 3.0. Use [allowGraph](/api/query-builder/eager-methods.html#allowgraph) instead. Note that you may need to add [clearAllowGraph](/api/query-builder/eager-methods.html#clearallowgraph) call too. `allowEager` cleared any old expressions automatically, while `allowGraph` merges them.
497-
498-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#alloweager)
499-
:::
500-
501-
## mergeAllowEager()
502-
503-
::: warning
504-
Deprecated! Will be removed in version 3.0. Use [allowGraph](/api/query-builder/eager-methods.html#allowgraph) instead.
505-
506-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#mergealloweager)
507-
:::
508-
509-
## modifyEager()
510-
511-
::: warning
512-
Deprecated! Will be removed in version 3.0. Use [modifyGraph](#modifygraph) instead.
513-
514-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#modifyeager)
515-
:::
516-
517407
## modifyGraph()
518408

519409
```js
@@ -575,14 +465,4 @@ The modifier can also be a [Model modifier](/api/model/static-properties.html#st
575465
Person.query()
576466
.withGraphFetched('[children.[pets, movies], movies]')
577467
.modifyGraph('children.movies', 'selectId');
578-
```
579-
580-
## filterEager()
581-
582-
::: warning
583-
Deprecated! Will be removed in version 3.0. Use [modifyGraph](#modifygraph) instead.
584-
585-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/eager-methods.md#filtereager)
586-
:::
587-
588-
Alias for [modifyGraph](/api/query-builder/other-methods.html#modifygraph).
468+
```

doc/api/query-builder/mutate-methods.md

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -131,38 +131,10 @@ See the [section about graph inserts](/guide/query-examples.html#graph-inserts).
131131
| ----------------------------------- | ---------------------------------- |
132132
| [QueryBuilder](/api/query-builder/) | `this` query builder for chaining. |
133133

134-
## allowInsert()
135-
136-
::: warning
137-
Deprecated! Will be removed in version 3.0. Use [allowGraph](/api/query-builder/eager-methods.html#allowgraph) instead. Note that you may need to add [clearAllowGraph](/api/query-builder/eager-methods.html#clearallowgraph) call too. `allowInsert` cleared any old expressions automatically, while `allowGraph` merges them.
138-
139-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/mutate-methods.md#allowinsert)
140-
:::
141-
142134
## insertGraphAndFetch()
143135

144136
Exactly like [insertGraph](/api/query-builder/mutate-methods.html#insertgraph) but also fetches the graph from the db after insert. Note that on postgres, you can simply chain [returning('\*')](/api/query-builder/find-methods.html#returning) to the normal `insertGraph` query to get the same result without additional queries.
145137

146-
## insertWithRelated()
147-
148-
::: warning
149-
Deprecated! Will be removed in version 2.0.
150-
151-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/mutate-methods.md#insertwithrelated)
152-
:::
153-
154-
Alias for [insertGraph](/api/query-builder/mutate-methods.html#insertgraph).
155-
156-
## insertWithRelatedAndFetch()
157-
158-
::: warning
159-
Deprecated! Will be removed in version 2.0.
160-
161-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/mutate-methods.md#insertwithrelatedandfetch)
162-
:::
163-
164-
Alias for [insertGraphAndFetch](/api/query-builder/mutate-methods.html#insertgraphandfetch).
165-
166138
## patch()
167139

168140
```js
@@ -449,14 +421,6 @@ It's also really easy to create a server that doesn't work well with multiple us
449421
| ----------------------------------- | ---------------------------------- |
450422
| [QueryBuilder](/api/query-builder/) | `this` query builder for chaining. |
451423

452-
## allowUpsert()
453-
454-
::: warning
455-
Deprecated! Will be removed in version 3.0. Use [allowGraph](/api/query-builder/eager-methods.html#allowgraph) instead. Note that you may need to add [clearAllowGraph](/api/query-builder/eager-methods.html#clearallowgraph) call too. `allowUpsert` cleared any old expressions automatically, while `allowGraph` merges them.
456-
457-
[v1 documentation](https://github.com/Vincit/objection.js/blob/v1/doc/api/query-builder/mutate-methods.md#allowupsert)
458-
:::
459-
460424
## upsertGraphAndFetch()
461425

462426
Exactly like [upsertGraph](/api/query-builder/mutate-methods.html#upsertgraph) but also fetches the graph from the db after the upsert operation.

0 commit comments

Comments
 (0)