Module: MdlSql

Defined in:
lib/mdlsql/col.rb,
lib/mdlsql.rb,
lib/mdlsql/join.rb,
lib/mdlsql/table.rb,
lib/mdlsql/where.rb,
lib/mdlsql/version.rb,
lib/mdlsql/sqlquery.rb

Overview

In order to contact the author of this gem, please write to [email protected].

Defined Under Namespace

Classes: Col, Join, SqlQuery, Table, Where

Constant Summary collapse

VERSION =
"0.0.7"

Class Method Summary collapse

Class Method Details

.config(values = {}) ⇒ Object

TODO:

Allow many simultaneous configurations. For the moment being, use different config files.

Calls SqlQuery.config to configurate futures queries.

Parameters:

  • values (Hash) (defaults to: {})

    a customizable set of options

Options Hash (values):

  • (Symbol)


62
63
64
# File 'lib/mdlsql.rb', line 62

def config(values={})
	SqlQuery.config(values)
end

.insertObject



45
46
47
48
# File 'lib/mdlsql.rb', line 45

def insert
	query = SqlQuery.new.insert()
  	return query
end

.query(str) ⇒ Object



55
56
57
# File 'lib/mdlsql.rb', line 55

def query str
	return SqlQuery.new.query(str)
end

.selectObject



40
41
42
43
# File 'lib/mdlsql.rb', line 40

def select()
  query = SqlQuery.new.select()
  return query
end

.update(table = nil) ⇒ Object



50
51
52
53
# File 'lib/mdlsql.rb', line 50

def update(table=nil)
	query = SqlQuery.new.update(table)
  return query
end