Exzeitable v0.2.8 Exzeitable.Database View Source

Database interactions

Link to this section Summary

Functions

I want to just do a select: count(c.id)

Get the data using query

We only want letters to avoid SQL injection attacks

Generates the magic SQL fragment that performs search dynamically. Created outside macro to bypass ecto restrictions

Link to this section Functions

Link to this function

get_record_count(assigns)

View Source
get_record_count(map()) :: integer()

I want to just do a select: count(c.id)

Link to this function

get_records(assigns)

View Source
get_records(map()) :: [map()]

Get the data using query

Link to this function

prefix_search(term)

View Source
prefix_search(String.t()) :: String.t()

We only want letters to avoid SQL injection attacks

Link to this function

tsvector_string(fields)

View Source
tsvector_string([keyword()]) :: String.t()

Generates the magic SQL fragment that performs search dynamically. Created outside macro to bypass ecto restrictions