Skip to content

Commit

Permalink
Update lib/exqlite/sqlite3.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Johnston <warmwaffles@gmail.com>
  • Loading branch information
ruslandoga and warmwaffles authored Oct 14, 2024
1 parent c23604f commit 7e66ddd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/exqlite/sqlite3.ex
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ defmodule Exqlite.Sqlite3 do
@doc """
Bulk-inserts rows into a prepared statement. Must be called inside a transaction.
The `types` parameter is type of each column in the order they are specified
in the parameter `rows`. For example, `[["a", 1, 1.0]]` would have `types`
specified as `[:text, :integer, :float]`.
iex> {:ok, conn} = Sqlite3.open(":memory:", [:readonly])
iex> :ok = Sqlite3.execute(conn, "CREATE TABLE users (name TEXT)")
iex> {:ok, insert} = Sqlite3.prepare(conn, "INSERT INTO users (name) VALUES (?)")
Expand Down

0 comments on commit 7e66ddd

Please sign in to comment.