FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
APIJSON/APIJSONORM/src/main/java/apijson/orm/Parser.java at master · Tencent/APIJSON · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
Tencent
/
APIJSON
Public
Notifications
You must be signed in to change notification settings
Fork
2.3k
Star
18.4k
Code
Issues
238
Pull requests
3
Actions
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
APIJSON
/
APIJSONORM
/
src
/
main
/
java
/
apijson
/
orm
/
Parser.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
134 lines (90 loc) · 3.62 KB
Breadcrumbs
APIJSON
/
APIJSONORM
/
src
/
main
/
java
/
apijson
/
orm
/
Parser.java
Copy path
File metadata and controls
executable file
·
134 lines (90 loc) · 3.62 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/*Copyright (C) 2020 Tencent. All rights reserved.
This source code is licensed under the Apache License Version 2.0.*/
package
apijson
.
orm
;
import
java
.
sql
.
SQLException
;
import
java
.
sql
.
Savepoint
;
import
java
.
util
.
List
;
import
java
.
util
.
Map
;
import
apijson
.*;
/**解析器
* @author Lemon
*/
public
interface
Parser
<
T
,
M
extends
Map
<
String
,
Object
>,
L
extends
List
<
Object
>>
extends
ParserCreator
<
T
,
M
,
L
>,
VerifierCreator
<
T
,
M
,
L
>,
SQLCreator
<
T
,
M
,
L
> {
@
NotNull
Visitor
<
T
>
getVisitor
();
Parser
<
T
,
M
,
L
>
setVisitor
(
@
NotNull
Visitor
<
T
>
visitor
);
@
NotNull
RequestMethod
getMethod
();
Parser
<
T
,
M
,
L
>
setMethod
(
@
NotNull
RequestMethod
method
);
int
getVersion
();
Parser
<
T
,
M
,
L
>
setVersion
(
int
version
);
String
getTag
();
Parser
<
T
,
M
,
L
>
setTag
(
String
tag
);
M
getRequest
();
Parser
<
T
,
M
,
L
>
setRequest
(
M
request
);
Parser
<
T
,
M
,
L
>
setNeedVerify
(
boolean
needVerify
);
boolean
isNeedVerifyLogin
();
Parser
<
T
,
M
,
L
>
setNeedVerifyLogin
(
boolean
needVerifyLogin
);
boolean
isNeedVerifyRole
();
Parser
<
T
,
M
,
L
>
setNeedVerifyRole
(
boolean
needVerifyRole
);
boolean
isNeedVerifyContent
();
Parser
<
T
,
M
,
L
>
setNeedVerifyContent
(
boolean
needVerifyContent
);
String
parse
(
String
request
);
String
parse
(
M
request
);
M
parseResponse
(
String
request
);
M
parseResponse
(
M
request
);
// 没必要性能还差 JSONRequest parseCorrectResponse(String table, JSONRequest response) throws Exception;
M
parseCorrectRequest
()
throws
Exception
;
M
parseCorrectRequest
(
RequestMethod
method
,
String
tag
,
int
version
,
String
name
,
M
request
,
int
maxUpdateCount
,
SQLCreator
<
T
,
M
,
L
>
creator
)
throws
Exception
;
Map
<
String
,
Object
>
getStructure
(
String
table
,
String
method
,
String
tag
,
int
version
)
throws
Exception
;
M
onObjectParse
(
M
request
,
String
parentPath
,
String
name
,
SQLConfig
<
T
,
M
,
L
>
arrayConfig
,
boolean
isSubquery
,
M
cache
)
throws
Exception
;
L
onArrayParse
(
M
request
,
String
parentPath
,
String
name
,
boolean
isSubquery
,
L
cache
)
throws
Exception
;
/**解析远程函数
* @param key
* @param function
* @param parentPath
* @param currentName
* @param currentObject
* @return
* @throws Exception
*/
Object
onFunctionParse
(
String
key
,
String
function
,
String
parentPath
,
String
currentName
,
M
currentObject
,
boolean
containRaw
)
throws
Exception
;
ObjectParser
<
T
,
M
,
L
>
createObjectParser
(
M
request
,
String
parentPath
,
SQLConfig
<
T
,
M
,
L
>
arrayConfig
,
boolean
isSubquery
,
boolean
isTable
,
boolean
isArrayMainTable
)
throws
Exception
;
int
getMinQueryPage
();
int
getMaxQueryPage
();
int
getDefaultQueryCount
();
int
getMaxQueryCount
();
int
getMaxUpdateCount
();
int
getMaxSQLCount
();
int
getMaxObjectCount
();
int
getMaxArrayCount
();
int
getMaxQueryDepth
();
void
putQueryResult
(
String
path
,
Object
result
);
Object
getValueByPath
(
String
valuePath
);
void
onVerifyLogin
()
throws
Exception
;
void
onVerifyContent
()
throws
Exception
;
void
onVerifyRole
(
SQLConfig
<
T
,
M
,
L
>
config
)
throws
Exception
;
M
executeSQL
(
SQLConfig
<
T
,
M
,
L
>
config
,
boolean
isSubquery
)
throws
Exception
;
SQLExecutor
<
T
,
M
,
L
>
getSQLExecutor
();
Verifier
<
T
,
M
,
L
>
getVerifier
();
Boolean
getGlobalFormat
();
String
getGlobalRole
();
String
getGlobalDatabase
();
String
getGlobalDatasource
();
String
getGlobalNamespace
();
String
getGlobalCatalog
();
String
getGlobalSchema
();
Boolean
getGlobalExplain
();
String
getGlobalCache
();
int
getTransactionIsolation
();
void
setTransactionIsolation
(
int
transactionIsolation
);
void
begin
(
int
transactionIsolation
);
void
rollback
()
throws
SQLException
;
void
rollback
(
Savepoint
savepoint
)
throws
SQLException
;
void
commit
()
throws
SQLException
;
void
close
();
M
newSuccessResult
();
M
newErrorResult
(
Exception
e
);
}
Back
|
FazBrowse Home
|
New Git URL