Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit cc5473b

Browse files
ABuffSeagullConnorRigby
authored andcommitted
Reuse type
1 parent 53b0780 commit cc5473b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

lib/sqlitex.ex

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ defmodule Sqlitex do
66
@type connection :: {:connection, reference(), reference()}
77
@type string_or_charlist :: String.t | charlist
88
@type sqlite_error :: {:error, {:sqlite_error, charlist}}
9-
@type query_option ::
10-
{:bind, [term]}
11-
| {:into, Enum.t}
12-
| {:db_timeout, pos_integer}
13-
| {:db_chunk_size, pos_integer}
149

1510
@moduledoc """
1611
Sqlitex gives you a way to create and query SQLite databases.
@@ -115,22 +110,22 @@ defmodule Sqlitex do
115110

116111
@doc "A shortcut to `Sqlitex.Query.query/3`"
117112
@spec query(Sqlitex.connection, String.t | charlist) :: {:ok, [keyword]} | {:error, term()}
118-
@spec query(Sqlitex.connection, String.t | charlist, [query_option]) :: {:ok, [keyword]} | {:error, term()}
113+
@spec query(Sqlitex.connection, String.t | charlist, [Sqlitex.Query.query_option]) :: {:ok, [keyword]} | {:error, term()}
119114
def query(db, sql, opts \\ []), do: Sqlitex.Query.query(db, sql, opts)
120115

121116
@doc "A shortcut to `Sqlitex.Query.query!/3`"
122117
@spec query!(Sqlitex.connection, String.t | charlist) :: [keyword]
123-
@spec query!(Sqlitex.connection, String.t | charlist, [query_option]) :: [Enum.t]
118+
@spec query!(Sqlitex.connection, String.t | charlist, [Sqlitex.Query.query_option]) :: [Enum.t]
124119
def query!(db, sql, opts \\ []), do: Sqlitex.Query.query!(db, sql, opts)
125120

126121
@doc "A shortcut to `Sqlitex.Query.query_rows/3`"
127122
@spec query_rows(Sqlitex.connection, String.t | charlist) :: {:ok, %{}} | Sqlitex.sqlite_error
128-
@spec query_rows(Sqlitex.connection, String.t | charlist, [query_option]) :: {:ok, %{}} | Sqlitex.sqlite_error
123+
@spec query_rows(Sqlitex.connection, String.t | charlist, [Sqlitex.Query.query_option]) :: {:ok, %{}} | Sqlitex.sqlite_error
129124
def query_rows(db, sql, opts \\ []), do: Sqlitex.Query.query_rows(db, sql, opts)
130125

131126
@doc "A shortcut to `Sqlitex.Query.query_rows!/3`"
132127
@spec query_rows!(Sqlitex.connection, String.t | charlist) :: %{}
133-
@spec query_rows!(Sqlitex.connection, String.t | charlist, [query_option]) :: %{}
128+
@spec query_rows!(Sqlitex.connection, String.t | charlist, [Sqlitex.Query.query_option]) :: %{}
134129
def query_rows!(db, sql, opts \\ []), do: Sqlitex.Query.query_rows!(db, sql, opts)
135130

136131
@doc """

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy