WsdataselectWeb.QueryController (wsdataselect v1.1.21)

Copy Markdown View Source

Summary

Functions

Authentication method for queryauth is HTTP Digest. Authentication method for query is based on JWT. No authentication, set user as anonymous.

This function is called on a /query request. It will fetch all the contents corresponding to the filters that were set up by WsdataselectWeb.Plugs.Filters, in the assigns of the connection plug (conn.assigns.filters). For each filter, the database request is done asynchronously in parallel. Desactivate the timeout, as the DB pool has it's own already, and some requests can get quite long.

Functions

authenticate(conn, opts)

Authentication method for queryauth is HTTP Digest. Authentication method for query is based on JWT. No authentication, set user as anonymous.

get_datafiles(conn)

@spec get_datafiles(Plug.Conn.t()) :: Plug.Conn.t()

This function is called on a /query request. It will fetch all the contents corresponding to the filters that were set up by WsdataselectWeb.Plugs.Filters, in the assigns of the connection plug (conn.assigns.filters). For each filter, the database request is done asynchronously in parallel. Desactivate the timeout, as the DB pool has it's own already, and some requests can get quite long.

For each entry, we call the post_process function in order to build a list of datasources and merge the contents of the same properties.

Finally, the datasources are put in the conn.assigns in order for ther renderer to access them in the :availabilities keyword.

open_api_operation(action)

@spec open_api_operation(atom()) :: OpenApiSpex.Operation.t()

query(conn, params)

send_data(conn)

@spec send_data(Plug.Conn.t()) :: Plug.Conn.t()

shared_security()

shared_tags()