MssqlEcto v0.1.4 MssqlEcto.Query

Summary

Functions

Receives a query and must return a SELECT query

Returns a DELETE for the filters returning the given returning

Receives a query and must return a DELETE query

Returns an INSERT for the given rows in table returning the given returning

Returns an UPDATE for the given fields in table filtered by filters returning the given returning

Receives a query and values to update and must return an UPDATE query

Functions

all(query)
all(query :: Ecto.Query.t) :: String.t

Receives a query and must return a SELECT query.

delete(prefix, table, filters, returning)
delete(prefix :: String.t, table :: String.t, filters :: [atom], returning :: [atom]) :: String.t

Returns a DELETE for the filters returning the given returning.

delete_all(query)
delete_all(query :: Ecto.Query.t) :: String.t

Receives a query and must return a DELETE query.

insert(prefix, table, header, rows, on_conflict, returning)
insert(prefix :: String.t, table :: String.t, header :: [atom], rows :: [[atom | nil]], on_conflict :: Ecto.Adapter.on_conflict, returning :: [atom]) :: String.t

Returns an INSERT for the given rows in table returning the given returning.

update(prefix, table, fields, filters, returning)
update(prefix :: String.t, table :: String.t, fields :: [atom], filters :: [atom], returning :: [atom]) :: String.t

Returns an UPDATE for the given fields in table filtered by filters returning the given returning.

update_all(query, prefix \\ nil)

Receives a query and values to update and must return an UPDATE query.