Robert Francis

Results 98 comments of Robert Francis

Did the same `Repo.insert` call I have for the above tests. Came through to the insert function I added to the adapter. ```ex import Ecto.Query, only: [from: 1] def insert(adapter_meta,...

@Danwhy Worked like a charm thanks 👍

```ex def insert(adapter_meta, %{source: source, prefix: prefix}, params, on_conflict, returning, opts) do params_map = Enum.into(params, %{}) map_for_cid = Map.drop(params_map, [:inserted_at, :updated_at]) cid = Cid.cid(map_for_cid) entry_id = create_entry_id(source, adapter_meta, cid, 2)...

The above adds the cid and entry_id to the database. Makes sure that the `entry_id` is unique. Only thing I am slightly unsure of is this line... |> Map.put(:cid, cid)...

@Danwhy I have created a [PR](https://github.com/dwyl/alog/pull/50) with code for the insert functionality. @Danwhy @SimonLab @nelsonic seems to be working as expected but please take a look at the pr and...

Getting an error when I try to run mix ecto.migrate ``` ➜ alog git:(insert) ✗ MIX_ENV=test mix ecto.create Compiling 11 files (.ex) Generated alog app The database for Alog.Repo has...

Something in the [`insert/6`](https://github.com/dwyl/alog/blob/insert/lib/alog.ex#L28-L54) function that is created on [this branch](https://github.com/dwyl/alog/pull/50) is causing the error. Not sure what it is at the moment but if I comment out the function...

Didn't notice this error message first time round... ```sh ** (MatchError) no match of right hand side value: {:error, %Postgrex.Error{connection_id: 39622, message: nil, postgres: %{code: :undefined_column, file: "parse_relation.c", line: "3293",...

This error appears to be caused by the schema migrations table. This appears to relate to [this comment](https://github.com/dwyl/alog/issues/40#issuecomment-463971092) from @Danwhy. Going to move on for now

Beginning to add tests to [this branch](https://github.com/dwyl/alog/tree/insert-testing). ### Migration file ```ex def change do create table(:comments, primary_key: false) do # cid & entry_id need to be removed later as they...