lib/baza/driver/tiny.rb in baza-0.0.36 vs lib/baza/driver/tiny.rb in baza-0.0.37
- old
+ new
@@ -1,10 +1,10 @@
class Baza::Driver::Tiny < Baza::BaseSqlDriver
- SEPARATOR_DATABASE = "[".freeze
- SEPARATOR_TABLE = "[".freeze
- SEPARATOR_COLUMN = "[".freeze
- SEPARATOR_INDEX = "[".freeze
+ SEPARATOR_DATABASE = "]".freeze
+ SEPARATOR_TABLE = "]".freeze
+ SEPARATOR_COLUMN = "]".freeze
+ SEPARATOR_INDEX = "]".freeze
SEPARATOR_VALUE = "'".freeze
def initialize(db)
@sep_database = SEPARATOR_DATABASE
@sep_table = SEPARATOR_TABLE
@@ -73,11 +73,10 @@
result = @client.execute(sql)
result.insert if args[:return_id]
end
def query(sql)
- result = @client.execute(sql)
- Baza::Driver::Tiny::Result.new(result)
+ Baza::Driver::Tiny::Result.new(@client.execute(sql))
end
def self.quote_identifier(name)
"[#{escape_database(name)}]"
end