Moebius.Runner

The main execution bits are in here.

Summary

Functions

Spawn a Postgrex worker to run our query using the config specified in /config

If there isn’t a connection process started then one is added to the command

Executes a command for a given transaction specified with pid. If the execution fails, it will be caught in Query.transaction/1 and reported back using {:error, err}

A convenience tool for assembling large queries with multiple commands. Not used currently. These functions hand off to PSQL because Postgrex can’t run more than one command per query

Functions

call_psql(args)
connect()

Spawn a Postgrex worker to run our query using the config specified in /config

execute(cmd)

If there isn’t a connection process started then one is added to the command

execute(cmd, pid)

Executes a command for a given transaction specified with pid. If the execution fails, it will be caught in Query.transaction/1 and reported back using {:error, err}.

run_file_with_psql(file, db \\ [database: "meebuss"][:database])
run_with_psql(sql, db \\ [database: "meebuss"][:database])

A convenience tool for assembling large queries with multiple commands. Not used currently. These functions hand off to PSQL because Postgrex can’t run more than one command per query.