Module z_search

Search the database, interfaces to specific search routines.

Copyright © 2009 Marc Worrell Date: 2009-04-15

Authors: Marc Worrell (marc@worrell.nl).

Description

Search the database, interfaces to specific search routines.

Data Types

search_offset()

search_offset() = pos_integer() | {pos_integer(), pos_integer()}

search_query()

search_query() = {atom(), list()}

Function Index

pager/3
pager/4
query_/2Given a query as proplist, return all results.
search/2Search with the question and return the results.
search/3Perform the named search and its arguments.
search_pager/3Search items and handle the paging.
search_pager/4Search items and handle the paging.
search_result/3Handle a return value from a search function.

Function Details

pager/3

pager(Search_result, Page, Context) -> any()

pager/4

pager(Search_result, Page, PageLen, Context) -> any()

query_/2

query_(Props, Context) -> [Id] | []

Given a query as proplist, return all results.

search/2

search(Search::{Name, SearchPropList}, Context::#context{}) -> #search_result{}

Search with the question and return the results

search/3

search(Search::search_query(), MaxRows::search_offset(), Context::z:context()) -> #search_result{}

Perform the named search and its arguments

search_pager/3

search_pager(Search::{Name, SearchPropList}, Page, Context::#context{}) -> #search_result{}

Search items and handle the paging. Uses the default page length.

search_pager/4

search_pager(Search::{Name, SearchPropList}, Page, PageLen, Context::#context{}) -> #search_result{}

Search items and handle the paging

search_result/3

search_result(L::list() | #search_result{} | #search_sql{}, Limit::search_offset(), Context::z:context()) -> #search_result{}

Handle a return value from a search function. This can be an intermediate SQL statement that still needs to be augmented with extra ACL checks.


Generated by EDoc