forked from iCyberon/pg_hashids
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pg_hashids--1.3.sql
48 lines (43 loc) · 2.73 KB
/
pg_hashids--1.3.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 'MODULE_PATHNAME', 'id_encode' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION hash_encode(BIGINT, TEXT) RETURNS TEXT
AS 'MODULE_PATHNAME', 'id_encode' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION hash_encode(BIGINT, TEXT, INT) RETURNS TEXT
AS 'MODULE_PATHNAME', 'id_encode' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION hash_decode(TEXT, TEXT, INT) RETURNS INT
AS 'MODULE_PATHNAME', 'id_decode_once' LANGUAGE C IMMUTABLE STRICT;
-- v1.3
CREATE OR REPLACE FUNCTION id_encode(BIGINT) RETURNS TEXT
AS 'MODULE_PATHNAME', 'id_encode' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_encode(BIGINT, TEXT) RETURNS TEXT
AS 'MODULE_PATHNAME', 'id_encode' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_encode(BIGINT, TEXT, INT) RETURNS TEXT
AS 'MODULE_PATHNAME', 'id_encode' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_encode(BIGINT, TEXT, INT, TEXT) RETURNS TEXT
AS 'MODULE_PATHNAME', 'id_encode' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_encode(BIGINT[]) RETURNS TEXT
AS 'MODULE_PATHNAME', 'id_encode_array' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_encode(BIGINT[], TEXT) RETURNS TEXT
AS 'MODULE_PATHNAME', 'id_encode_array' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_encode(BIGINT[], TEXT, INT) RETURNS TEXT
AS 'MODULE_PATHNAME', 'id_encode_array' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_encode(BIGINT[], TEXT, INT, TEXT) RETURNS TEXT
AS 'MODULE_PATHNAME', 'id_encode_array' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_decode(TEXT) RETURNS BIGINT[]
AS 'MODULE_PATHNAME', 'id_decode' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_decode(TEXT, TEXT) RETURNS BIGINT[]
AS 'MODULE_PATHNAME', 'id_decode' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_decode(TEXT, TEXT, INT) RETURNS BIGINT[]
AS 'MODULE_PATHNAME', 'id_decode' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_decode(TEXT, TEXT, INT, TEXT) RETURNS BIGINT[]
AS 'MODULE_PATHNAME', 'id_decode' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_decode_once(TEXT) RETURNS BIGINT
AS 'MODULE_PATHNAME', 'id_decode_once' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_decode_once(TEXT, TEXT) RETURNS BIGINT
AS 'MODULE_PATHNAME', 'id_decode_once' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_decode_once(TEXT, TEXT, INT) RETURNS BIGINT
AS 'MODULE_PATHNAME', 'id_decode_once' LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION id_decode_once(TEXT, TEXT, INT, TEXT) RETURNS BIGINT
AS 'MODULE_PATHNAME', 'id_decode_once' LANGUAGE C IMMUTABLE STRICT;