HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

Bit String Functions and Operators

Compared with the original MogDB, Dolphin modifies the bit string functions as follows:

  1. The bit_bool function is added.
  • bit_bool(bit)

    Description: Returns a Boolean value based on the data in the bit string. If the value is 0, false is returned. Otherwise, true is returned.

    Return type: Boolean

    Example:

  MogDB=# select bit_bool('11111');
   bit_bool 
  ----------
   t
  (1 row)
  MogDB=# select bit_bool('00001');
   bit_bool 
  ----------
   t
  (1 row)
  MogDB=# select bit_bool('00000');
   bit_bool 
  ----------
   f
  (1 row)
Copyright © 2011-2024 www.enmotech.com All rights reserved.