Completed
Push — master ( 8968b1...9cd635 )
by Mehmet
02:51
created
src/SQL.php 1 patch
Doc Comments   +19 added lines patch added patch discarded remove patch
@@ -53,6 +53,9 @@  discard block
 block discarded – undo
53 53
         $this->conn = DriverManager::getConnection($connectionParams);
54 54
     }
55 55
 
56
+    /**
57
+     * @param string $collection
58
+     */
56 59
     public function create($collection, $fields)
57 60
     {
58 61
         $columns = [];
@@ -86,6 +89,9 @@  discard block
 block discarded – undo
86 89
         return $schemaManager->createTable($table);
87 90
     }
88 91
 
92
+    /**
93
+     * @param string $collection
94
+     */
89 95
     public function drop($collection)
90 96
     {
91 97
         $schemaManager = $this->conn->getSchemaManager();
@@ -126,6 +132,9 @@  discard block
 block discarded – undo
126 132
 
127 133
     }
128 134
 
135
+    /**
136
+     * @param string $collection
137
+     */
129 138
     public function insert($collection, $values)
130 139
     {
131 140
         $insertion = $this->conn->insert($collection, $values);
@@ -140,6 +149,9 @@  discard block
 block discarded – undo
140 149
         return $this->conn->update($collection, $values, $filter);
141 150
     }
142 151
 
152
+    /**
153
+     * @param string $collection
154
+     */
143 155
     public function delete($collection, $filter)
144 156
     {
145 157
         $numberOfDeletedItems = $this->conn->delete($collection, $filter);
@@ -149,11 +161,18 @@  discard block
 block discarded – undo
149 161
         return 0;
150 162
     }
151 163
 
164
+    /**
165
+     * @param string $collection
166
+     * @param string|null $docId
167
+     */
152 168
     public function get($collection, $docId)
153 169
     {
154 170
         return $this->conn->fetchAssoc('SELECT * FROM '.$collection.' WHERE id = ?', array($docId));
155 171
     }
156 172
 
173
+    /**
174
+     * @param string $collection
175
+     */
157 176
     public function find($collection, $filters, $fields = null, $sort = null, $start = 0, $limit = 25, $debug = false)
158 177
     {
159 178
         $result = null;
Please login to merge, or discard this patch.