This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| childDeepClone: function (child) { | |
| var childCopy = _.pick(child, 'lastName', 'firstName', 'middleName', 'birthDate', 'gender', 'birthPlace', 'snils'); | |
| if (_.isArray(child.addressList)) { | |
| var addressCopy = []; | |
| _.each(child.addressList, function (address) { | |
| if (address) { | |
| addressCopy.push(_.pick(address, 'postalCode', 'fullAddress', 'fullHouse', 'addressUID', 'houseUID', 'plain', 'oktmo', 'flat', 'type')); | |
| } else { | |
| addressCopy.push(null); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| explain ANALYZE WITH RECURSIVE sub_orgs(gid, organization_type) AS | |
| (SELECT o.gid, o.organization_type FROM en_organization o | |
| WHERE gid = 'b55d19bc-1ecc-68d9-bf7a-78ec21808327' | |
| UNION SELECT | |
| o.gid, o.organization_type FROM sub_orgs so, en_organization o | |
| WHERE o.management_organization_gid = so.gid AND o.organization_type IN ('MOUO', 'ROUO')) | |
| SELECT * FROM sub_orgs; | |
| "CTE Scan on sub_orgs (cost=16.32..17.14 rows=41 width=36)" | |
| " CTE sub_orgs" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WITH RECURSIVE oktmos ("id", parent_id) AS ( | |
| SELECT o."id", o.parent_id | |
| FROM oktmo o | |
| WHERE o."id" = 71875000 | |
| UNION ALL | |
| SELECT o."id", o.parent_id | |
| FROM oktmo o INNER JOIN oktmos ON (oktmos."id" = o.parent_id) | |
| ), | |
| fs AS ( | |
| SELECT sc."id", sc."shortname" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WITH RECURSIVE oktmos ("id", parent_id) AS ( | |
| SELECT o."id", o.parent_id | |
| FROM oktmo o | |
| WHERE o."id" = 71875000 | |
| UNION ALL | |
| SELECT o."id", o.parent_id | |
| FROM oktmo o INNER JOIN oktmos ON (oktmos."id" = o.parent_id) | |
| ), | |
| schools_in_municipality AS ( | |
| SELECT sc."id", sc."shortname" |
NewerOlder