Class: DB::MariaDB::Native::Types::Text

Inherits:
Object
  • Object
show all
Defined in:
lib/db/mariadb/native/types.rb

Overview

A text/string type converter.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = "TEXT") ⇒ Text

Initialize a text type converter.



18
19
20
# File 'lib/db/mariadb/native/types.rb', line 18

def initialize(name = "TEXT")
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



23
24
25
# File 'lib/db/mariadb/native/types.rb', line 23

def name
  @name
end

#The SQL type name.(SQLtypename.) ⇒ Object (readonly)



23
# File 'lib/db/mariadb/native/types.rb', line 23

attr :name

Instance Method Details

#parse(string) ⇒ Object

Parse a string value from the database.



28
29
30
# File 'lib/db/mariadb/native/types.rb', line 28

def parse(string)
  string
end