class QueryBuilder

Defined in:

query_builder.cr

Constant Summary

DEFAULT_PAGE_SIZE = 24
MAX_QUERY_CACHE = 128
SORTING_TYPES = {"id" => "id DESC", "id:desc" => "id DESC", "id:asc" => "id ASC", "kudos" => "kudos DESC", "kudos:desc" => "kudos DESC", "kudos:asc" => "kudos ASC", "cum" => "kudos DESC", "cum:desc" => "kudos DESC", "cum:asc" => "kudos ASC", "score" => "kudos DESC", "score:desc" => "kudos DESC", "score:asc" => "kudos ASC", "random" => "RANDOM()"}

Constructors

Instance Method Summary

Constructor Detail

def self.new(db : DB::Database, text : String = "", page : Int64 = 0) #

[View source]

Instance Method Detail

def cache #

[View source]
def page : Int64 #

[View source]
def page=(page : Int64) #

[View source]
def page_sql #

[View source]
def path_filter : String | Nil #

[View source]
def path_filter=(path_filter : String | Nil) #

[View source]
def sorting : String #

[View source]
def sorting=(sorting : String) #

[View source]
def sql #

[View source]
def text : String #

[View source]
def text=(text : String) #

[View source]
def unknown_tags : Array(String) #

[View source]
def valid_tags : Array(String) #

[View source]