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
| { | |
| "rules": [ | |
| { | |
| "rule-type": "selection", | |
| "rule-id": "1", | |
| "rule-name": "1", | |
| "object-locator": { | |
| "schema-name": "%", | |
| "table-name": "%" | |
| }, |
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
| update dbo.earth set node = | |
| case | |
| when node = '\' then '0' | |
| else '0' || replace(left(node, length(node) - 1 ),'\', '.') | |
| end; | |
| alter table dbo.earth | |
| alter column node type ltree using node::ltree; |
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
| create schema dbo; | |
| create extension ltree schema public; | |
| create table dbo.earth ( | |
| id serial primary key, | |
| node character varying(20), | |
| name character varying(20) | |
| ); |
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
| create database migrationdemo; | |
| GO | |
| use migrationdemo | |
| GO | |
| create table earth ( | |
| id int identity(1,1) primary key, | |
| node hierarchyid, | |
| name varchar(20) |
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
| package main | |
| import ( | |
| "fmt" | |
| "math/rand" | |
| "sync" | |
| "time" | |
| ) | |
| type Message struct { |