Closed viqueen closed 2 years ago
From what I see, column types are only applied on select method, but we expect them to work for update.returning too
select
update.returning
await domain.schema.createTableIfNotExists('information', (t) => { t.bigIncrements('id'); t.string('dynamo_id').unique().nullable(); t.jsonb('payload'); }); const [output] = await domain('information') .update({ id: 1, user_id: 'one', payload: { name: 'moi', age: 22 } }) .returning('*'); console.info('** payload', output.payload); console.info('** name', output.payload.name); // returns undefined
fix on the way here https://github.com/markusahlstrand/knex-data-api-client/pull/100
From what I see, column types are only applied on
select
method, but we expect them to work forupdate.returning
too