Skip to content

"no such cmd: insert" #106

@peffis

Description

@peffis

Hi,

With version 3.3 (I suppose current master) I cannot insert documents (your tests are also failing). It works neither with maps nor with bson documents. See below.

/Stefan

1> Database = <<"test">>.
<<"test">>

2>  {ok, Connection} = mc_worker_api:connect ([{database, Database}]).
{ok,<0.107.0>}

3> mc_worker_api:insert(Connection, <<"test">>, #{<<"_id">> => <<"123">>, <<"name">> => <<"Stefan">>}).
{{false,#{<<"bad cmd">> => #{<<"documents">> => [#{<<"_id">> => <<"123">>,<<"name">> => <<"Stefan">>}],
            <<"insert">> => <<"test">>},
          <<"errmsg">> => <<"no such cmd: insert">>}},
 #{<<"_id">> => <<"123">>,<<"name">> => <<"Stefan">>}}

4> mc_worker_api:insert(Connection, <<"test">>, [{<<"_id">>, <<"123">>, <<"name">>, <<"Stefan">>}]).   
{{false,#{<<"bad cmd">> => #{<<"documents">> => [#{<<"_id">> => <<"123">>,<<"name">> => <<"Stefan">>}],
            <<"insert">> => <<"test">>},
          <<"errmsg">> => <<"no such cmd: insert">>}},
 [{<<"_id">>,<<"123">>,<<"name">>,<<"Stefan">>}]}

5> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions