-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
pg_hashids--1.0--1.1.sql
48 lines (43 loc) · 2.3 KB
/
pg_hashids--1.0--1.1.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
\echo Use "CREATE EXTENSION pg_hashids" to load this file. \quit
-- v1
CREATE OR REPLACE FUNCTION hash_encode(BIGINT) RETURNS TEXT
AS 'pg_hashids', 'id_encode' LANGUAGE C;
CREATE OR REPLACE FUNCTION hash_encode(BIGINT, TEXT) RETURNS TEXT
AS 'pg_hashids', 'id_encode' LANGUAGE C;
CREATE OR REPLACE FUNCTION hash_encode(BIGINT, TEXT, INT) RETURNS TEXT
AS 'pg_hashids', 'id_encode' LANGUAGE C;
CREATE OR REPLACE FUNCTION hash_decode(TEXT, TEXT, INT) RETURNS INT
AS 'pg_hashids', 'id_decode_once' LANGUAGE C;
-- v1.1
CREATE OR REPLACE FUNCTION id_encode(BIGINT) RETURNS TEXT
AS 'pg_hashids', 'id_encode' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_encode(BIGINT, TEXT) RETURNS TEXT
AS 'pg_hashids', 'id_encode' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_encode(BIGINT, TEXT, INT) RETURNS TEXT
AS 'pg_hashids', 'id_encode' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_encode(BIGINT, TEXT, INT, TEXT) RETURNS TEXT
AS 'pg_hashids', 'id_encode' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_encode(BIGINT[]) RETURNS TEXT
AS 'pg_hashids', 'id_encode_array' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_encode(BIGINT[], TEXT) RETURNS TEXT
AS 'pg_hashids', 'id_encode_array' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_encode(BIGINT[], TEXT, INT) RETURNS TEXT
AS 'pg_hashids', 'id_encode_array' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_encode(BIGINT[], TEXT, INT, TEXT) RETURNS TEXT
AS 'pg_hashids', 'id_encode_array' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_decode(TEXT) RETURNS BIGINT[]
AS 'pg_hashids', 'id_decode' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_decode(TEXT, TEXT) RETURNS BIGINT[]
AS 'pg_hashids', 'id_decode' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_decode(TEXT, TEXT, INT) RETURNS BIGINT[]
AS 'pg_hashids', 'id_decode' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_decode(TEXT, TEXT, INT, TEXT) RETURNS BIGINT[]
AS 'pg_hashids', 'id_decode' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_decode_once(TEXT) RETURNS BIGINT
AS 'pg_hashids', 'id_decode_once' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_decode_once(TEXT, TEXT) RETURNS BIGINT
AS 'pg_hashids', 'id_decode_once' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_decode_once(TEXT, TEXT, INT) RETURNS BIGINT
AS 'pg_hashids', 'id_decode_once' LANGUAGE C;
CREATE OR REPLACE FUNCTION id_decode_once(TEXT, TEXT, INT, TEXT) RETURNS BIGINT
AS 'pg_hashids', 'id_decode_once' LANGUAGE C;