aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-04-01 15:57:49 -0400
committerPaul Duncan <pabs@pablotron.org>2016-04-01 15:57:49 -0400
commit974d7c1d8ae71d50566dc8c2857520dde139a191 (patch)
tree2f9c01e741a7c8a3e603c03f07ffcb4f0ac3b91d /src
parent2727f8682e6c2fb8934bae2ff9a624cd6fac8cc0 (diff)
downloadold-guff-974d7c1d8ae71d50566dc8c2857520dde139a191.tar.bz2
old-guff-974d7c1d8ae71d50566dc8c2857520dde139a191.zip
update TODO
Diffstat (limited to 'src')
-rw-r--r--src/guff/models/role.cr28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/guff/models/role.cr b/src/guff/models/role.cr
new file mode 100644
index 0000000..9faf6b2
--- /dev/null
+++ b/src/guff/models/role.cr
@@ -0,0 +1,28 @@
+class Guff::RoleModel < Guff::Model
+ SQL = TemplateCache.new({
+ get_roles: "
+ SELECT role_id,
+ role_name,
+ role_desc
+
+ FROM roles
+
+ -- FIXME
+ ORDER BY role_id
+ ",
+ })
+
+ def initialize(models : Models)
+ super(models, SQL)
+ end
+
+ def get_roles
+ r = [] of Hash(String, SQLite3::Value)
+
+ all(:get_roles, nil, nil) do |row|
+ r << row
+ end
+
+ r
+ end
+end