1 create or replace function xt.sharetype_did_change() returns trigger as $$
\r
2 /* Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.
\r
3 See www.xm.ple.com/CPAL for the full text of the software license. */
\r
9 rows = plv8.execute("select * from xt.sharetype");
\r
12 rows.forEach(function (row) {
\r
14 row.sharetype_col_obj_uuid + " as obj_uuid," +
\r
15 row.sharetype_col_username + " as username " +
\r
16 "from " + row.sharetype_nsname + "." + row.sharetype_tblname + " ";
\r
20 sql = "select xt.create_view('xt.share_users','" + ary.join(" union all ") + "', true)";
\r