Back to Pocketbase

Interface NullString

static/jsvm/interfaces/sql.NullString.html

latest1.1 KB
Original Source

Interface NullString

NullString represents a string that may be null. NullString implements the [Scanner] interface so it can be used as a scan destination:

var s NullString err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&s) ... if s.Valid { // use s.String } else { // NULL value }Copy

Hierarchy

  • NullString

Index

Methods

scanvalue

Properties

stringvalid

Methods

scan

  • scan(value): void

Scan implements the [Scanner] interface.

Parameters

value: any

Returns void

value

  • value(): any

Value implements the [driver.Valuer] interface.

Returns any

Properties

string

string: string

valid

valid: boolean

Settings

Member Visibility

  • Inherited

Theme

OSLightDark

On This Page

Generated using TypeDoc