Skip to content

After "0.3.0" some of my queries started to fail #24

@sezaru

Description

@sezaru

Here is an example of one that is failing now:

iex(1)> defmodule Bla do
...(1)>   use SQL, adapter: SQL.Adapters.Postgres
...(1)>
...(1)>   def bla do
...(1)>     ~SQL[insert into temp_records.records (select * from "pacman.public".records)]
...(1)>   end
...(1)> end
** (CaseClauseError) no case clause matching: %{table_type: "BASE TABLE", table_schema: "pacman.public", table_name: {"records", :records, #Function<42.81571850/1 in :erl_eval.expr/6>}, table_catalog: "core_dev", self_referencing_column_name: nil, reference_generation: nil, user_defined_type_catalog: nil, user_defined_type_schema: nil, user_defined_type_name: nil, is_insertable_into: "YES", is_typed: "NO", commit_action: nil}
    (sql 0.3.0) lib/parser.ex:189: SQL.Parser.validate_table/3
    (elixir 1.18.4) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3
    (sql 0.3.0) lib/parser.ex:170: SQL.Parser.parse/7
    (sql 0.3.0) lib/parser.ex:127: SQL.Parser.parse/2
    (sql 0.3.0) lib/sql.ex:91: SQL.build/4
    (sql 0.3.0) expanding macro: SQL.sigil_SQL/2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions