summaryrefslogtreecommitdiffstats
path: root/did-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'did-model.lua')
-rw-r--r--did-model.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/did-model.lua b/did-model.lua
index 0e39d7a..e7d1113 100644
--- a/did-model.lua
+++ b/did-model.lua
@@ -622,6 +622,22 @@ function getdefinitionlist(did, extension, identification, description, departme
return def
end
+function searchdefinitions(did)
+ local result = {}
+ local res, err = pcall(function()
+ local connected = databaseconnect(DatabaseUser)
+ local list = listdefinitions("^"..did)
+ for i,did in ipairs(list) do
+ result[#result+1] = did.did
+ end
+ if connected then databasedisconnect() end
+ end)
+ if not res then
+ def.errtxt = err
+ end
+ return cfe({ type="list", value=result, label="DID list" })
+end
+
function getdefinition(did)
local errtxt
local group = {}