@@ -45,11 +45,6 @@ public function let($variableName, $expression)
45
45
*/
46
46
public function insert ($ document , string $ collection ): QueryBuilder
47
47
{
48
- $ document = $ this ->normalizeArgument ($ document , ['RegisteredVariable ' , 'Object ' , 'Bind ' ]);
49
-
50
- $ this ->registerCollections ($ collection );
51
- $ collection = $ this ->normalizeArgument ($ collection , ['Collection ' , 'Bind ' ]);
52
-
53
48
$ this ->addClause (new InsertClause ($ document , $ collection ));
54
49
55
50
return $ this ;
@@ -68,11 +63,6 @@ public function insert($document, string $collection): QueryBuilder
68
63
*/
69
64
public function update ($ document , $ with , $ collection ): QueryBuilder
70
65
{
71
- $ document = $ this ->normalizeArgument ($ document , ['RegisteredVariable ' , 'Key ' , 'Object ' , 'Bind ' ]);
72
- $ with = $ this ->normalizeArgument ($ with , ['Object ' , 'Bind ' ]);
73
- $ this ->registerCollections ($ collection );
74
- $ collection = $ this ->normalizeArgument ($ collection , ['Collection ' , 'Bind ' ]);
75
-
76
66
$ this ->addClause (new UpdateClause ($ document , $ with , $ collection ));
77
67
78
68
return $ this ;
@@ -91,11 +81,6 @@ public function update($document, $with, $collection): QueryBuilder
91
81
*/
92
82
public function replace ($ document , $ with , string $ collection ): QueryBuilder
93
83
{
94
- $ document = $ this ->normalizeArgument ($ document , ['RegisteredVariable ' , 'Key ' , 'Object ' , 'Bind ' ]);
95
- $ with = $ this ->normalizeArgument ($ with , ['Object ' , 'Bind ' ]);
96
- $ this ->registerCollections ($ collection );
97
- $ collection = $ this ->normalizeArgument ($ collection , ['Collection ' , 'Bind ' ]);
98
-
99
84
$ this ->addClause (new ReplaceClause ($ document , $ with , $ collection ));
100
85
101
86
return $ this ;
@@ -118,12 +103,6 @@ public function replace($document, $with, string $collection): QueryBuilder
118
103
*/
119
104
public function upsert ($ search , $ insert , $ with , string $ collection , bool $ replace = false ): QueryBuilder
120
105
{
121
- $ search = $ this ->normalizeArgument ($ search , ['RegisteredVariable ' , 'Key ' , 'Bind ' ]);
122
- $ insert = $ this ->normalizeArgument ($ insert , ['RegisteredVariable ' , 'Key ' , 'Bind ' ]);
123
- $ with = $ this ->normalizeArgument ($ with , ['Object ' , 'Bind ' ]);
124
- $ collection = $ this ->normalizeArgument ($ collection , ['Collection ' , 'Bind ' ]);
125
- $ this ->registerCollections ($ collection );
126
-
127
106
$ this ->addClause (new UpsertClause ($ search , $ insert , $ with , $ collection , $ replace ));
128
107
129
108
return $ this ;
@@ -141,10 +120,6 @@ public function upsert($search, $insert, $with, string $collection, bool $replac
141
120
*/
142
121
public function remove ($ document , string $ collection ): QueryBuilder
143
122
{
144
- $ document = $ this ->normalizeArgument ($ document , ['RegisteredVariable ' , 'Key ' , 'Object ' , 'Bind ' ]);
145
- $ this ->registerCollections ($ collection );
146
- $ collection = $ this ->normalizeArgument ($ collection , ['Collection ' , 'Bind ' ]);
147
-
148
123
$ this ->addClause (new RemoveClause ($ document , $ collection ));
149
124
150
125
return $ this ;
0 commit comments