Permalink
Browse files

focusing on setlimit (peopel moved on from TC 1.4.10). Closes gh-26

  • Loading branch information...
1 parent ee5e442 commit 4b0a75eb793d315b35193584b4850c593f81ede4 @jmettraux committed Dec 22, 2009
Showing with 4 additions and 17 deletions.
  1. +1 −3 lib/rufus/edo/tabcore.rb
  2. +1 −6 lib/rufus/tokyo/cabinet/lib.rb
  3. +1 −3 lib/rufus/tokyo/cabinet/table.rb
  4. +1 −5 lib/rufus/tokyo/tyrant/lib.rb
View
4 lib/rufus/edo/tabcore.rb
@@ -533,9 +533,7 @@ def add (colname, operator, val, affirmative=true, no_index=false)
#
def limit (i, offset=-1)
- @query.respond_to?(:setlimit) ?
- @query.setlimit(i, offset) :
- @query.setmax(i)
+ @query.setlimit(i, offset)
end
# Sets the sort order for the result of the query
View
7 lib/rufus/tokyo/cabinet/lib.rb
@@ -177,12 +177,7 @@ class << self
callback :TDBQRYPROC, [:pointer, :int, :pointer, :pointer], :int
attfunc :qry_proc, :tctdbqryproc, [ :pointer, :TDBQRYPROC, :pointer], :bool
-
- begin # since TC 1.4.10
- attfunc :qry_setmax, :tctdbqrysetmax, [ :pointer, :int ], :void
- rescue FFI::NotFoundError => nfe
- attfunc :qry_setlimit, :tctdbqrysetlimit, [ :pointer, :int, :int ], :void
- end
+ attfunc :qry_setlimit, :tctdbqrysetlimit, [ :pointer, :int, :int ], :void
attfunc :qry_search, :tctdbqrysearch, [ :pointer ], :pointer
attfunc :qry_searchout, :tctdbqrysearchout, [ :pointer ], :bool
View
4 lib/rufus/tokyo/cabinet/table.rb
@@ -722,9 +722,7 @@ def add (colname, operator, val, affirmative=true, no_index=false)
#
def limit (i, offset=-1)
- lib.respond_to?(:qry_setlimit) ?
- lib.qry_setlimit(@query, i, offset) :
- lib.qry_setmax(@query, i)
+ lib.qry_setlimit(@query, i, offset)
end
# Sets the sort order for the result of the query
View
6 lib/rufus/tokyo/tyrant/lib.rb
@@ -140,11 +140,7 @@ class << self
attfunc :qry_addcond, :tcrdbqryaddcond, [ :pointer, :string, :int, :string ], :void
attfunc :qry_setorder, :tcrdbqrysetorder, [ :pointer, :string, :int ], :void
- begin
- attfunc :qry_setmax, :tcrdbqrysetmax, [ :pointer, :int ], :void
- rescue FFI::NotFoundError => nfe
- attfunc :qry_setlimit, :tcrdbqrysetlimit, [ :pointer, :int, :int ], :void
- end
+ attfunc :qry_setlimit, :tcrdbqrysetlimit, [ :pointer, :int, :int ], :void
attfunc :qry_search, :tcrdbqrysearch, [ :pointer ], :pointer
attfunc :qry_searchout, :tcrdbqrysearchout, [ :pointer ], :bool

0 comments on commit 4b0a75e

Please sign in to comment.