Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/database-jobs/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EXTENSION = pgpm-database-jobs
DATA = sql/pgpm-database-jobs--0.26.2.sql
DATA = sql/pgpm-database-jobs--0.26.3.sql

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
Expand Down
2 changes: 1 addition & 1 deletion packages/database-jobs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
"bugs": {
"url": "https://github.com/constructive-io/pgpm-modules/issues"
}
}
}
2 changes: 1 addition & 1 deletion packages/database-jobs/pgpm-database-jobs.control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pgpm-database-jobs extension
comment = 'pgpm-database-jobs extension'
default_version = '0.26.2'
default_version = '0.26.3'
module_pathname = '$libdir/pgpm-database-jobs'
requires = 'plpgsql,pgcrypto,pgpm-verify,pgpm-jwt-claims'
relocatable = false
Expand Down
2 changes: 1 addition & 1 deletion packages/encrypted-secrets-table/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EXTENSION = pgpm-encrypted-secrets-table
DATA = sql/pgpm-encrypted-secrets-table--0.15.5.sql
DATA = sql/pgpm-encrypted-secrets-table--0.26.0.sql

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
Expand Down
2 changes: 1 addition & 1 deletion packages/encrypted-secrets-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
"bugs": {
"url": "https://github.com/constructive-io/pgpm-modules/issues"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pgpm-encrypted-secrets-table extension
comment = 'pgpm-encrypted-secrets-table extension'
default_version = '0.15.5'
default_version = '0.26.0'
module_pathname = '$libdir/pgpm-encrypted-secrets-table'
requires = 'pgcrypto,plpgsql,pgpm-verify'
relocatable = false
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions packages/inflection-db/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EXTENSION = pgpm-inflection-db
DATA = sql/pgpm-inflection-db--0.26.0.sql
EXTENSION = inflection-db
DATA = sql/inflection-db--0.26.4.sql

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,43 +223,3 @@ cases(
]
);

cases(
'get_namespace_name',
async (opts: { name: string; parts: string[]; result: string }) => {
const [{ get_namespace_name }] = await pg.any(
'SELECT * FROM inflection_db.get_namespace_name($1::text[])',
[opts.parts]
);
expect(get_namespace_name).toEqual(opts.result);
},
[
{
name: 'simple',
parts: ['constructive', 'myApp'],
result: 'constructive_my_app'
},
{
name: 'single',
parts: ['test'],
result: 'test'
}
]
);

cases(
'get_schema_name',
async (opts: { name: string; parts: string[]; result: string }) => {
const [{ get_schema_name }] = await pg.any(
'SELECT * FROM inflection_db.get_schema_name($1::text[])',
[opts.parts]
);
expect(get_schema_name).toEqual(opts.result);
},
[
{
name: 'simple',
parts: ['my', 'schema'],
result: 'my-schema'
}
]
);
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ $$
LANGUAGE 'sql'
STABLE;

COMMIT;
COMMIT;
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ $$
LANGUAGE 'sql'
IMMUTABLE;
COMMIT;

Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ $$
LANGUAGE 'sql'
IMMUTABLE;

COMMIT;
COMMIT;
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ $$
LANGUAGE 'sql'
STABLE;
COMMIT;

Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ $$
LANGUAGE 'sql'
IMMUTABLE;
COMMIT;

Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ $$
LANGUAGE 'sql'
STABLE;
COMMIT;

Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ $$
LANGUAGE 'sql'
STABLE;
COMMIT;

Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ $$
LANGUAGE 'sql'
VOLATILE;
COMMIT;

Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
-- Deploy schemas/inflection_db/procedures/get_table_name to pg

-- requires: schemas/inflection_db/schema
-- requires: schemas/inflection_db/procedures/get_identifier

BEGIN;

CREATE FUNCTION inflection_db.get_table_name(
table_name text
) RETURNS text AS $$
CREATE FUNCTION inflection_db.get_table_name (table_name text)
RETURNS text
AS $$
SELECT
inflection_db.get_identifier (inflection.plural (inflection.underscore (table_name)));
$$
LANGUAGE 'sql' IMMUTABLE;
LANGUAGE 'sql'
IMMUTABLE;

CREATE FUNCTION inflection_db.get_table_name(
parts text[]
) RETURNS text AS $$
CREATE FUNCTION inflection_db.get_table_name (parts text[])
RETURNS text
AS $$
SELECT
inflection_db.get_identifier (inflection.plural (inflection.underscore (parts)));
$$
LANGUAGE 'sql' IMMUTABLE;
LANGUAGE 'sql'
IMMUTABLE;

COMMIT;

Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ $$
LANGUAGE 'sql'
IMMUTABLE;
COMMIT;

Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ $$
LANGUAGE 'sql'
IMMUTABLE;
COMMIT;

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
-- requires: schemas/inflection_db/procedures/get_identifier

BEGIN;
-- ${table_name}_${field1}_${field2}_${fieldN}_key
CREATE FUNCTION inflection_db.get_unique_index_name (table_name text, fields text[])
RETURNS text
AS $$
Expand All @@ -16,3 +17,4 @@ $$
LANGUAGE 'sql'
STABLE;
COMMIT;

7 changes: 7 additions & 0 deletions packages/inflection-db/inflection-db.control
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# inflection-db extension
comment = 'inflection-db extension'
default_version = '0.26.4'
module_pathname = '$libdir/inflection-db'
requires = 'pgpm-inflection,pgpm-verify,plpgsql'
relocatable = false
superuser = false
27 changes: 15 additions & 12 deletions packages/inflection-db/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
forceExit: true,
preset: 'ts-jest',
testEnvironment: 'node',

// Match both __tests__ and colocated test files
testMatch: ['**/?(*.)+(test|spec).{ts,tsx,js,jsx}'],

// Ignore build artifacts and type declarations
testPathIgnorePatterns: ['/dist/', '\\.d\\.ts$'],
modulePathIgnorePatterns: ['<rootDir>/dist/'],
watchPathIgnorePatterns: ['/dist/'],

moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
preset: "ts-jest",
testEnvironment: "node",
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
babelConfig: false,
tsconfig: "tsconfig.json",
},
],
},
transformIgnorePatterns: [`/node_modules/*`],
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
modulePathIgnorePatterns: ["dist/*"]
};
2 changes: 1 addition & 1 deletion packages/inflection-db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"bugs": {
"url": "https://github.com/constructive-io/pgpm-modules/issues"
}
}
}
7 changes: 0 additions & 7 deletions packages/inflection-db/pgpm-inflection-db.control

This file was deleted.

8 changes: 4 additions & 4 deletions packages/inflection-db/pgpm.plan
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%syntax-version=1.0.0
%project=pgpm-inflection-db
%uri=pgpm-inflection-db

%project=inflection-db
%uri=inflection-db
schemas/inflection_db/schema [pgpm-inflection:schemas/inflection/tables/inflection_rules/indexes/inflection_rules_type_idx pgpm-verify:procedures/verify_view] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/inflection_db/schema
schemas/inflection_db/procedures/get_identifier [schemas/inflection_db/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/inflection_db/procedures/get_identifier
schemas/inflection_db/procedures/get_table_name [schemas/inflection_db/schema schemas/inflection_db/procedures/get_identifier] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/inflection_db/procedures/get_table_name
Expand All @@ -16,4 +16,4 @@ schemas/inflection_db/procedures/get_schema_name [schemas/inflection_db/schema s
schemas/inflection_db/procedures/get_table_plural_name [schemas/inflection_db/schema schemas/inflection_db/procedures/get_identifier] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/inflection_db/procedures/get_table_plural_name
schemas/inflection_db/procedures/get_table_singular_name [schemas/inflection_db/schema schemas/inflection_db/procedures/get_identifier] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/inflection_db/procedures/get_table_singular_name
schemas/inflection_db/procedures/get_unique_index_name [schemas/inflection_db/schema schemas/inflection_db/procedures/get_table_name schemas/inflection_db/procedures/get_identifier] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/inflection_db/procedures/get_unique_index_name
schemas/inflection_db/procedures/get_namespace_name [schemas/inflection_db/schema schemas/inflection_db/procedures/get_identifier] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/inflection_db/procedures/get_namespace_name
schemas/inflection_db/procedures/get_namespace_name [schemas/inflection_db/schema schemas/inflection_db/procedures/get_identifier] 2026-05-21T00:00:00Z devin <devin@cognition.ai> # add schemas/inflection_db/procedures/get_namespace_name
Loading
Loading