module SQLite3ExtendFunction::Functions::OctetLength

SQLite3ExtendFunction::Functions::OctetLength

Public Class Methods

call(str) click to toggle source

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

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