Search code examples
perldbix-class

How to reset column value to DEFAULT when updating it with DBIx::Class?


When updating column in postgresql we can reset it value to DEFAULT

UPDATE table SET column = DEFAULT

Is there analogue in DBIx::Class? Just like this:

$schame->result_set( 'table' )->update({ column => DEFAULT })

Solution

  • Thank you to ilmari. I need ref to use literal SQL:

    $schame->result_set( 'table' )->update({ column => \'DEFAULT' })