Module: Statsample::Database

Defined in:
lib/statsample/converters.rb

Overview

Create and dumps Datasets on a database

NOTE

Deprecated. Use Daru::DataFrame.from_sql and Daru::DataFrame#write_sql

Class Method Summary collapse

Class Method Details

.create_sql(ds, table, charset = "UTF8") ⇒ Object

Create a sql, basen on a given Dataset

NOTE

Deprecated. Use Daru::DataFrame#create_sql instead.

Raises:

  • (NoMethodError)


32
33
34
# File 'lib/statsample/converters.rb', line 32

def create_sql(ds,table,charset="UTF8")
  raise NoMethodError, "Deprecated. Use Daru::DataFrame#create_sql instead."
end

.insert(ds, dbh, table) ⇒ Object

Insert each case of the Dataset on the selected table

NOTE

Deprecated. Use Daru::DataFrame#write_sql instead

Raises:

  • (NoMethodError)


24
25
26
# File 'lib/statsample/converters.rb', line 24

def insert(ds, dbh, table)
  raise NoMethodError, "Deprecated. Use Daru::DataFrame#write_sql instead."
end

.read(dbh, query) ⇒ Object

Read a database query and returns a Dataset

NOTE

Deprecated. Use Daru::DataFrame.from_sql instead.

Raises:

  • (NoMethodError)


15
16
17
# File 'lib/statsample/converters.rb', line 15

def read(dbh,query)
  raise NoMethodError, "Deprecated. Use Daru::DataFrame.from_sql instead."
end