stor update

For database.

Update information in a specified table in the in-memory sqlite database.

Command Type

built-in

Signature

> stor update {flags}

Flags

  • --table-name, -t {string}: Name of the table you want to insert into.
  • --update-record, -u {record}: A record of column names and column values to update in the specified table.
  • --where-clause, -w {string}: A sql string to use as a where clause without the WHERE keyword.

Input/output types:

input output
nothing table
record table
any table

Examples

Update the in-memory sqlite database

> stor update --table-name nudb --update-record {str1: nushell datetime1: 2020-04-17}

Update the in-memory sqlite database with a where clause

> stor update --table-name nudb --update-record {str1: nushell datetime1: 2020-04-17} --where-clause "bool1 = 1"

Update the in-memory sqlite database through pipeline input

> {str1: nushell datetime1: 2020-04-17} | stor update --table-name nudb

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.