File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ interface EggMySqlConfig {
27
27
28
28
type EggMySQLInsertResult = object [ ] ;
29
29
type EggMySQLSelectResult = object [ ] ;
30
+ type EggMySQLGetResult = object ;
30
31
interface EggMySQLCondition {
31
32
where ?: object ;
32
33
orders ?: [ string , "desc" | "asc" | "DESC" | "ASC" ] [ ] ;
@@ -53,7 +54,12 @@ interface EggMySQLLiterals {
53
54
interface EggMySQL {
54
55
literals : EggMySQLLiterals ;
55
56
/// Returns mysql client instance.
56
- get : ( dbName : string ) => EggMySQL ;
57
+ get ( dbName : string ) : EggMySQL ;
58
+ get (
59
+ table : string ,
60
+ where ?: object ,
61
+ condition ?: EggMySQLCondition
62
+ ) : Promise < EggMySQLGetResult > ;
57
63
/// execute sql e.g.
58
64
/// query('update posts set hits = (hits + ?) where id = ?', [1, postId])
59
65
query : (
You can’t perform that action at this time.
0 commit comments