sen

sen

Hi all, what should input to field(:test, :map)?

field(:test, {:array, :map}) => name: [%{“name1” => “test”, “name2” => “test”}]

field(:test, :map) => ???

Showing Posts 1 to 4

NobbZ

NobbZ

Can you please elaborate your question? Where does the field/2 function come from? What is meant by =>?

sen

sen OP

Hi, Thanks for reply.
just a schema table, i want to know what value should be input in field(:test1, :map).

schema “tablename” do
field(:id, :integer)
field(:name, :string)
field(:test1, :map)
field(:test2, {:array, :map})
end

because i know field(:test2, {:array, :map}) input like this
test: [%{“name1” => “test”, “name2” => “test”}] ,
but i dun know what value should be input in field(:test1, :map).

NobbZ

NobbZ

So this question is related to ecto?

From its documentation it seems as if :map simply maps over to elixirs map type, eg: %{} or %{"foo" => 2}.

sen

sen OP

Yes, correct . Thanks for answer.

— All posts loaded —

Where Next? Top

Trending in Chat/Questions Top

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews