module SQLite3ExtendFunction::Functions::Md5

SQLite3ExtendFunction::Functions::Md5

Public Class Methods

call(str) click to toggle source

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

# File lib/sqlite3_extend_function/functions/md5.rb, line 11
def call(str)
  Digest::MD5.hexdigest(str) unless str.nil?
rescue StandardError
  raise SQLite3::SQLException, 'No function matches the given name and argument types. ' \
    'You might need to add explicit type casts.'
end