libasynql  3.2.0
Asynchronous MySQL access library for PocketMine plugins.
DataConnector.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * libasynql
5  *
6  * Copyright (C) 2018 SOFe
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 declare(strict_types=1);
22 
23 namespace poggit\libasynql;
24 
27 
31 interface DataConnector{
37  public function setLoggingQueries(bool $loggingQueries) : void;
38 
44  public function isLoggingQueries() : bool;
45 
57  public function loadQueryFile($fh, string $fileName = null) : void;
58 
66  public function loadQuery(GenericStatement $stmt) : void;
67 
76  public function executeGeneric(string $queryName, array $args = [], ?callable $onSuccess = null, ?callable $onError = null) : void;
77 
78  public function executeGenericRaw(string $query, array $args = [], ?callable $onSuccess = null, ?callable $onError = null) : void;
79 
88  public function executeChange(string $queryName, array $args = [], ?callable $onSuccess = null, ?callable $onError = null) : void;
89 
90  public function executeChangeRaw(string $query, array $args = [], ?callable $onSuccess = null, ?callable $onError = null) : void;
91 
100  public function executeInsert(string $queryName, array $args = [], ?callable $onInserted = null, ?callable $onError = null) : void;
101 
102  public function executeInsertRaw(string $query, array $args = [], ?callable $onInserted = null, ?callable $onError = null) : void;
103 
112  public function executeSelect(string $queryName, array $args = [], ?callable $onSelect = null, ?callable $onError = null) : void;
113 
114  public function executeSelectRaw(string $query, array $args = [], ?callable $onSelect = null, ?callable $onError = null) : void;
115 
121  public function waitAll() : void;
122 
126  public function close() : void;
127 }
executeChange(string $queryName, array $args=[], ?callable $onSuccess=null, ?callable $onError=null)
executeSelect(string $queryName, array $args=[], ?callable $onSelect=null, ?callable $onError=null)
executeGenericRaw(string $query, array $args=[], ?callable $onSuccess=null, ?callable $onError=null)
executeInsert(string $queryName, array $args=[], ?callable $onInserted=null, ?callable $onError=null)
executeSelectRaw(string $query, array $args=[], ?callable $onSelect=null, ?callable $onError=null)
executeInsertRaw(string $query, array $args=[], ?callable $onInserted=null, ?callable $onError=null)
loadQuery(GenericStatement $stmt)
executeChangeRaw(string $query, array $args=[], ?callable $onSuccess=null, ?callable $onError=null)
executeGeneric(string $queryName, array $args=[], ?callable $onSuccess=null, ?callable $onError=null)
loadQueryFile($fh, string $fileName=null)
setLoggingQueries(bool $loggingQueries)