View Source Exzeitable.Database (Exzeitable v0.6.8)

Database interactions

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. Searches across columns that are searchable. Replaces nulls with a space. Created outside macro to bypass ecto restrictions

Functions

get_record_count(params)

@spec get_record_count(map()) :: integer()

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

get_records(params)

@spec get_records(map()) :: [map()]

Get the data using query

prefix_search(terms)

@spec prefix_search(String.t()) :: String.t()

We only want letters to avoid SQL injection attacks

tsvector_string(fields)

@spec tsvector_string([keyword()]) :: String.t()

Generates the magic SQL fragment that performs search dynamically. Searches across columns that are searchable. Replaces nulls with a space. Created outside macro to bypass ecto restrictions