question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This type is specific to table relations and casting to OIDs for internal relations. I believe this type is used by TypeORM for the relationship decorators.

Is there a possibility of this being implemented in the future?

Error for reference:
Error: Not supported: Type "regclass"
          at Object.fromNative (/home/bobby/phorm-new/node_modules/pg-mem/src/datatypes.ts:858:19)
          at _buildValueReal (/home/bobby/phorm-new/node_modules/pg-mem/src/predicate.ts:82:26)
          at _buildValue (/home/bobby/phorm-new/node_modules/pg-mem/src/predicate.ts:33:11)
          at _buildValueReal (/home/bobby/phorm-new/node_modules/pg-mem/src/predicate.ts:81:20)
          at _buildValue (/home/bobby/phorm-new/node_modules/pg-mem/src/predicate.ts:33:11)
          at /home/bobby/phorm-new/node_modules/pg-mem/src/predicate.ts:77:44
          at Array.map (<anonymous>)
          at _buildValueReal (/home/bobby/phorm-new/node_modules/pg-mem/src/predicate.ts:77:35)
          at _buildValue (/home/bobby/phorm-new/node_modules/pg-mem/src/predicate.ts:33:11)
          at Object.buildValue (/home/bobby/phorm-new/node_modules/pg-mem/src/predicate.ts:16:12)
          at new Selection (/home/bobby/phorm-new/node_modules/pg-mem/src/transforms/selection.ts:132:28)
          at Object.buildSelection (/home/bobby/phorm-new/node_modules/pg-mem/src/transforms/selection.ts:30:12)
          at OrFilter.select (/home/bobby/phorm-new/node_modules/pg-mem/src/transforms/transform-base.ts:46:20)
          at Query.buildSelect (/home/bobby/phorm-new/node_modules/pg-mem/src/query.ts:399:23)
          at Query.queries (/home/bobby/phorm-new/node_modules/pg-mem/src/query.ts:98:47)
          at queries.next (<anonymous>)
          at Query.query (/home/bobby/phorm-new/node_modules/pg-mem/src/query.ts:42:20)
          at /home/bobby/phorm-new/node_modules/pg-mem/src/adapters.ts:81:80
          at Timeout.task [as _onTimeout] (/home/bobby/phorm-new/node_modules/jsdom/lib/jsdom/browser/Window.js:391:19)
          at listOnTimeout (internal/timers.js:554:17)
          at processTimers (internal/timers.js:497:7)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:36 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
oguimbalcommented, Dec 10, 2020

Ah ! The important bit is UnhandledPromiseRejectionWarning … this is fixed in pg-mem@1.4.3 … its just a warning, but agreed, this was not supposed to be here (nor related to any test).

FYI, this is the fix and here is how it is tested

2reactions
oguimbalcommented, Dec 9, 2020

@MirrorBytes FYI I’ve created a unit test that matches your use case.

And we’re almost there… oid is now supported (1.4.1), but on delete cascade is not. I’ll implement that 😃

🔨 Not supported 🔨 : Foreign keys with actions not yet supported

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation: 15: 8.19. Object Identifier Types - PostgreSQL
The regclass input converter handles the table lookup according to the schema path setting, and so it does the “right thing” automatically. Similarly,...
Read more >
In PostgreSQL, what does "regclass" mean? - Minimalistic Oracle
"regclass" is an alias for an Object Identifier, which are used internally by PostgreSQL as primary keys for several data dictionary tables.
Read more >
What is the data type of 'emp::regclass'?
regclass and the other reg types are "object identifier types". As the documentation says: The oid type is currently implemented as an ...
Read more >
Object Identifier Type - pgPedia - a PostgreSQL Encyclopedia
An object identifier type (also known as OID alias type ) is a special data ... For example, casting a table row's tableoid...
Read more >
8.11. Object Identifier Types
Type oid represents an object identifier. There are also several alias types for oid: regproc, regprocedure, regoper, regoperator, regclass, and regtype.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found