@@ -243,12 +243,14 @@ public function hint($index)
243
243
}
244
244
245
245
/** @inheritdoc */
246
+ #[Override]
246
247
public function find ($ id , $ columns = [])
247
248
{
248
249
return $ this ->where ('_id ' , '= ' , $ this ->convertKey ($ id ))->first ($ columns );
249
250
}
250
251
251
252
/** @inheritdoc */
253
+ #[Override]
252
254
public function value ($ column )
253
255
{
254
256
$ result = (array ) $ this ->first ([$ column ]);
@@ -257,12 +259,14 @@ public function value($column)
257
259
}
258
260
259
261
/** @inheritdoc */
262
+ #[Override]
260
263
public function get ($ columns = [])
261
264
{
262
265
return $ this ->getFresh ($ columns );
263
266
}
264
267
265
268
/** @inheritdoc */
269
+ #[Override]
266
270
public function cursor ($ columns = [])
267
271
{
268
272
$ result = $ this ->getFresh ($ columns , true );
@@ -579,6 +583,7 @@ public function generateCacheKey()
579
583
}
580
584
581
585
/** @return ($function is null ? AggregationBuilder : mixed) */
586
+ #[Override]
582
587
public function aggregate ($ function = null , $ columns = ['* ' ])
583
588
{
584
589
assert (is_array ($ columns ), new TypeError (sprintf ('Argument #2 ($columns) must be of type array, %s given ' , get_debug_type ($ columns ))));
@@ -654,6 +659,7 @@ public function aggregateByGroup(string $function, array $columns = ['*'])
654
659
}
655
660
656
661
/** @inheritdoc */
662
+ #[Override]
657
663
public function exists ()
658
664
{
659
665
return $ this ->first (['id ' ]) !== null ;
@@ -676,6 +682,7 @@ public function distinct($column = false)
676
682
*
677
683
* @inheritdoc
678
684
*/
685
+ #[Override]
679
686
public function orderBy ($ column , $ direction = 'asc ' )
680
687
{
681
688
if (is_string ($ direction )) {
@@ -697,6 +704,7 @@ public function orderBy($column, $direction = 'asc')
697
704
}
698
705
699
706
/** @inheritdoc */
707
+ #[Override]
700
708
public function whereBetween ($ column , iterable $ values , $ boolean = 'and ' , $ not = false )
701
709
{
702
710
$ type = 'between ' ;
@@ -721,6 +729,7 @@ public function whereBetween($column, iterable $values, $boolean = 'and', $not =
721
729
}
722
730
723
731
/** @inheritdoc */
732
+ #[Override]
724
733
public function insert (array $ values )
725
734
{
726
735
// Allow empty insert batch for consistency with Eloquent SQL
@@ -755,6 +764,7 @@ public function insert(array $values)
755
764
}
756
765
757
766
/** @inheritdoc */
767
+ #[Override]
758
768
public function insertGetId (array $ values , $ sequence = null )
759
769
{
760
770
$ options = $ this ->inheritConnectionOptions ();
@@ -774,6 +784,7 @@ public function insertGetId(array $values, $sequence = null)
774
784
}
775
785
776
786
/** @inheritdoc */
787
+ #[Override]
777
788
public function update (array $ values , array $ options = [])
778
789
{
779
790
// Use $set as default operator for field names that are not in an operator
@@ -790,6 +801,7 @@ public function update(array $values, array $options = [])
790
801
}
791
802
792
803
/** @inheritdoc */
804
+ #[Override]
793
805
public function upsert (array $ values , $ uniqueBy , $ update = null ): int
794
806
{
795
807
if ($ values === []) {
@@ -836,6 +848,7 @@ public function upsert(array $values, $uniqueBy, $update = null): int
836
848
}
837
849
838
850
/** @inheritdoc */
851
+ #[Override]
839
852
public function increment ($ column , $ amount = 1 , array $ extra = [], array $ options = [])
840
853
{
841
854
$ query = ['$inc ' => [(string ) $ column => $ amount ]];
@@ -856,6 +869,7 @@ public function increment($column, $amount = 1, array $extra = [], array $option
856
869
return $ this ->performUpdate ($ query , $ options );
857
870
}
858
871
872
+ #[Override]
859
873
public function incrementEach (array $ columns , array $ extra = [], array $ options = [])
860
874
{
861
875
$ stage ['$addFields ' ] = $ extra ;
@@ -873,12 +887,14 @@ public function incrementEach(array $columns, array $extra = [], array $options
873
887
}
874
888
875
889
/** @inheritdoc */
890
+ #[Override]
876
891
public function decrement ($ column , $ amount = 1 , array $ extra = [], array $ options = [])
877
892
{
878
893
return $ this ->increment ($ column , -1 * $ amount , $ extra , $ options );
879
894
}
880
895
881
896
/** @inheritdoc */
897
+ #[Override]
882
898
public function decrementEach (array $ columns , array $ extra = [], array $ options = [])
883
899
{
884
900
$ decrement = [];
@@ -932,6 +948,7 @@ public function divide($column, $amount, array $extra = [], array $options = [])
932
948
}
933
949
934
950
/** @inheritdoc */
951
+ #[Override]
935
952
public function pluck ($ column , $ key = null )
936
953
{
937
954
$ results = $ this ->get ($ key === null ? [$ column ] : [$ column , $ key ]);
@@ -942,6 +959,7 @@ public function pluck($column, $key = null)
942
959
}
943
960
944
961
/** @inheritdoc */
962
+ #[Override]
945
963
public function delete ($ id = null )
946
964
{
947
965
// If an ID is passed to the method, we will set the where clause to check
@@ -973,6 +991,7 @@ public function delete($id = null)
973
991
}
974
992
975
993
/** @inheritdoc */
994
+ #[Override]
976
995
public function from ($ collection , $ as = null )
977
996
{
978
997
if ($ collection ) {
@@ -1012,6 +1031,7 @@ public function lists($column, $key = null)
1012
1031
*
1013
1032
* @template T
1014
1033
*/
1034
+ #[Override]
1015
1035
public function raw ($ value = null )
1016
1036
{
1017
1037
// Execute the closure on the mongodb collection
@@ -1114,11 +1134,13 @@ public function drop($columns)
1114
1134
*
1115
1135
* @inheritdoc
1116
1136
*/
1137
+ #[Override]
1117
1138
public function newQuery ()
1118
1139
{
1119
1140
return new static ($ this ->connection , $ this ->grammar , $ this ->processor );
1120
1141
}
1121
1142
1143
+ #[Override]
1122
1144
public function runPaginationCountQuery ($ columns = ['* ' ])
1123
1145
{
1124
1146
if ($ this ->distinct ) {
@@ -1201,6 +1223,7 @@ public function convertKey($id)
1201
1223
*
1202
1224
* @return $this
1203
1225
*/
1226
+ #[Override]
1204
1227
public function where ($ column , $ operator = null , $ value = null , $ boolean = 'and ' )
1205
1228
{
1206
1229
$ params = func_get_args ();
@@ -1714,6 +1737,7 @@ private function inheritConnectionOptions(array $options = []): array
1714
1737
}
1715
1738
1716
1739
/** @inheritdoc */
1740
+ #[Override]
1717
1741
public function __call ($ method , $ parameters )
1718
1742
{
1719
1743
if ($ method === 'unset ' ) {
@@ -1724,90 +1748,105 @@ public function __call($method, $parameters)
1724
1748
}
1725
1749
1726
1750
/** @internal This method is not supported by MongoDB. */
1751
+ #[Override]
1727
1752
public function toSql ()
1728
1753
{
1729
1754
throw new BadMethodCallException ('This method is not supported by MongoDB. Try "toMql()" instead. ' );
1730
1755
}
1731
1756
1732
1757
/** @internal This method is not supported by MongoDB. */
1758
+ #[Override]
1733
1759
public function toRawSql ()
1734
1760
{
1735
1761
throw new BadMethodCallException ('This method is not supported by MongoDB. Try "toMql()" instead. ' );
1736
1762
}
1737
1763
1738
1764
/** @internal This method is not supported by MongoDB. */
1765
+ #[Override]
1739
1766
public function whereColumn ($ first , $ operator = null , $ second = null , $ boolean = 'and ' )
1740
1767
{
1741
1768
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1742
1769
}
1743
1770
1744
1771
/** @internal This method is not supported by MongoDB. */
1772
+ #[Override]
1745
1773
public function whereFullText ($ columns , $ value , array $ options = [], $ boolean = 'and ' )
1746
1774
{
1747
1775
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1748
1776
}
1749
1777
1750
1778
/** @internal This method is not supported by MongoDB. */
1779
+ #[Override]
1751
1780
public function groupByRaw ($ sql , array $ bindings = [])
1752
1781
{
1753
1782
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1754
1783
}
1755
1784
1756
1785
/** @internal This method is not supported by MongoDB. */
1786
+ #[Override]
1757
1787
public function orderByRaw ($ sql , $ bindings = [])
1758
1788
{
1759
1789
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1760
1790
}
1761
1791
1762
1792
/** @internal This method is not supported by MongoDB. */
1793
+ #[Override]
1763
1794
public function unionAll ($ query )
1764
1795
{
1765
1796
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1766
1797
}
1767
1798
1768
1799
/** @internal This method is not supported by MongoDB. */
1800
+ #[Override]
1769
1801
public function union ($ query , $ all = false )
1770
1802
{
1771
1803
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1772
1804
}
1773
1805
1774
1806
/** @internal This method is not supported by MongoDB. */
1807
+ #[Override]
1775
1808
public function having ($ column , $ operator = null , $ value = null , $ boolean = 'and ' )
1776
1809
{
1777
1810
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1778
1811
}
1779
1812
1780
1813
/** @internal This method is not supported by MongoDB. */
1814
+ #[Override]
1781
1815
public function havingRaw ($ sql , array $ bindings = [], $ boolean = 'and ' )
1782
1816
{
1783
1817
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1784
1818
}
1785
1819
1786
1820
/** @internal This method is not supported by MongoDB. */
1821
+ #[Override]
1787
1822
public function havingBetween ($ column , iterable $ values , $ boolean = 'and ' , $ not = false )
1788
1823
{
1789
1824
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1790
1825
}
1791
1826
1792
1827
/** @internal This method is not supported by MongoDB. */
1828
+ #[Override]
1793
1829
public function whereIntegerInRaw ($ column , $ values , $ boolean = 'and ' , $ not = false )
1794
1830
{
1795
1831
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1796
1832
}
1797
1833
1798
1834
/** @internal This method is not supported by MongoDB. */
1835
+ #[Override]
1799
1836
public function orWhereIntegerInRaw ($ column , $ values )
1800
1837
{
1801
1838
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1802
1839
}
1803
1840
1804
1841
/** @internal This method is not supported by MongoDB. */
1842
+ #[Override]
1805
1843
public function whereIntegerNotInRaw ($ column , $ values , $ boolean = 'and ' )
1806
1844
{
1807
1845
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
1808
1846
}
1809
1847
1810
1848
/** @internal This method is not supported by MongoDB. */
1849
+ #[Override]
1811
1850
public function orWhereIntegerNotInRaw ($ column , $ values , $ boolean = 'and ' )
1812
1851
{
1813
1852
throw new BadMethodCallException ('This method is not supported by MongoDB ' );
0 commit comments