module SQLite3ExtendFunction::Functions::BitLength

SQLite3ExtendFunction::Functions::BitLength

Public Class Methods

call(str) click to toggle source

@param [String] str @return [Integer] @raise [SQLite3::SQLException]

# File lib/sqlite3_extend_function/functions/bit_length.rb, line 11
def call(str)
  str.bytesize * 8
rescue ArgumentError
  raise SQLite3::SQLException,
        'No function matches the given name and argument types. ' \
        'You might need to add explicit type casts.'
end