1

I am using Postgresql database. My ORM is objection.js ( with Knex). I am trying to insert a record with all default values like so in raw sql:

INSERT INTO public.myTable DEFAULT VALUES;

All these default values are defined already in the related schema, for all fields except ID (auto increment).

My question is, how to do this in Objection.js/knex??

salouri
  • 760
  • 1
  • 8
  • 19

0 Answers0