forked from openwebwork/webwork2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnew-DB-API
91 lines (70 loc) · 2.04 KB
/
new-DB-API
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
--------------------------------------------------------------------------------
DB API
--------------------------------------------------------------------------------
The DB API defines the following methods. These methods are grouped according to which tables they access. A method followed by a list of "=>"-prefixed methods depends on the listed methods.
password
listPasswords()
addPassword($Password)
getPassword($userID)
putPassword($Password)
deletePassword($userID)
permission
listPermissionLevels()
addPermissionLevel($PermissionLevel)
getPermissionLevel($userID)
putPermissionLevel($PermissionLevel)
deletePermissionLevel($userID)
key
listKeys()
addKey($Key)
getKey($userID)
putKey($Key)
deleteKey($userID)
user
listUsers()
addUser($User)
getUser($userID)
putUser($User)
deleteUser($userID)
=> deletePassword($userID)
=> deletePermissionLevel($userID)
=> deleteKey($userID)
=> deleteUserSet($userID, *)
set
listGlobalSets()
addGlobalSet($GlobalSet)
getGlobalSet($setID)
putGlobalSet($GlobalSet)
deleteGlobalSet($setID)
=> deleteGlobalProblem($setID, *)
=> deleteUserSet(*, $setID)
set_user
listSetUsers($setID)
listUserSets($userID)
addUserSet($UserSet)
getUserSet($userID, $setID)
putUserSet($UserSet)
deleteUserSet($userID, $setID)
=> deleteUserProblem($userID, $setID, *)
problem
listGlobalProblems($setID)
addGlobalProblem($GlobalProblem)
getGlobalProblem($setID, $problemID)
putGlobalProblem($GlobalProblem)
deleteGlobalProblem($setID, $problemID)
=> deleteUserProblem(*, $setID, $problemID)
problem_user
listProblemUsers($setID, $problemID)
listUserProblems($userID, $setID)
addUserProblem($UserProblem)
getUserProblem($userID, $setID, $problemID)
putUserProblem($UserProblem)
deleteUserProblem($userID, $setID, $problemID)
set+set_user
getGlobalUserSet($userID, $setID)
=> getGlobalSet($setID)
=> getUserSet($userID, $setID)
problem+problem_user
getGlobalUserProblem($userID, $setID, $problemID)
=> getGlobalProblem($setID, $problemID)
=> getUserProblem($userID, $setID, $problemID)