Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
- version: "18"

pair:
- elixir: "1.13"
otp: "24"
- elixir: "1.15"
otp: "25"
include:
- pg:
version: "18"
Expand Down
2 changes: 1 addition & 1 deletion lib/postgrex/extensions/bit_string.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defmodule Postgrex.Extensions.BitString do
val when is_bitstring(val) ->
bin_size = byte_size(val)
last_pos = bin_size - 1
<<binary::binary-size(last_pos), last::bits>> = val
<<binary::binary-size(^last_pos), last::bits>> = val
pad = 8 - bit_size(last)
bit_count = bit_size(val)

Expand Down
2 changes: 1 addition & 1 deletion lib/postgrex/extensions/tsvector.ex
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ defmodule Postgrex.Extensions.TSVector do
def decode_tsvector_values(words) do
[word, <<positions_count::16, rest::binary>>] = :binary.split(words, <<0>>)
positions_bytes = positions_count * 2
<<positions::binary-size(positions_bytes), remaining_data::binary>> = rest
<<positions::binary-size(^positions_bytes), remaining_data::binary>> = rest

positions =
for <<weight::2, position::14 <- positions>>, do: {position, decode_weight(weight)}
Expand Down
2 changes: 1 addition & 1 deletion lib/postgrex/messages.ex
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ defmodule Postgrex.Messages do

:gss_cont ->
rest_size = size - 2
<<data::size(rest_size)>> = rest
<<data::size(^rest_size)>> = rest
data

:sasl ->
Expand Down
2 changes: 1 addition & 1 deletion lib/postgrex/protocol.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3299,7 +3299,7 @@ defmodule Postgrex.Protocol do
size = size - 4

case rest do
<<body::binary(size), rest::binary>> ->
<<body::binary(^size), rest::binary>> ->
{:ok, parse(body, type, size), rest}

_ ->
Expand Down
2 changes: 0 additions & 2 deletions lib/postgrex/query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ defmodule Postgrex.Query do
end

defimpl DBConnection.Query, for: Postgrex.Query do
require Postgrex.Messages

def parse(%{types: nil, name: name} = query, _) do
# for query table to match names must be equal
%{query | name: IO.iodata_to_binary(name)}
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ defmodule Postgrex.Mixfile do
use Mix.Project

@source_url "https://github.com/elixir-ecto/postgrex"
@version "0.21.1"
@version "0.22.0-dev"

def project do
[
app: :postgrex,
version: @version,
elixir: "~> 1.13",
elixir: "~> 1.15",
deps: deps(),
name: "Postgrex",
description: "PostgreSQL driver for Elixir",
Expand Down
Loading