Sakthibalan
attributes do
attribute :id, :uuid do
writable? false
primary_key? true
default &Ecto.UUID.generate/0
allow_nil? false
public? true
end
attribute :first_name, :string do
allow_nil? false
public? true
end
attribute :last_name, :string do
allow_nil? false
public? true
end
attribute :class, :string, public?: true
attribute :section, :string, public?: true
attribute :dob, :date, public?: true
attribute :roll_number, :string, public?: true
create_timestamp :inserted_at
update_timestamp :updated_at
end
student = Ash.get!(MyApp.Students.Student, "806b5689-faaf-4f79-a773-c2817826568e")
#MyApp.Students.Student<
__meta__: #Ecto.Schema.Metadata<:loaded, "students">,
id: "806b5689-faaf-4f79-a773-c2817826568e",
first_name: "xxxx",
last_name: "yyyyy",
class: "1 std",
section: "A",
roll_number: "100",
inserted_at: ~U[2024-05-16 05:38:10.074562Z],
updated_at: ~U[2024-05-16 05:38:10.074562Z],
aggregates: %{},
calculations: %{},
...
>
student |> Ash.Changeset.for_update(:update, %{section: "B"}) |> Ash.update!()
↳ AshPostgres.DataLayer.update_query/4, at: lib/data_layer.ex:1289
** (Ash.Error.Unknown) Unknown Error
- %Postgrex.Error{message: nil, postgres: %{code: :undefined_function, line: “636”, message: “function ash_raise_error(jsonb, timestamp without time zone) does not exist”, position: “93”, file: “parse_func.c”, unknown: “ERROR”, severity: “ERROR”, hint: “No function matches the given name and argument types. You might need to add explicit type casts.”, pg_code: “42883”, routine: “ParseFuncOrColumn”}, connection_id: 23725, query: “UPDATE "students" AS s0 SET "updated_at" = (CASE WHEN $1::timestamp::timestamp IS NULL THEN ash_raise_error($2::jsonb, s0."updated_at"::timestamp) ELSE $3::timestamp::timestamp END), "section" = $4::text WHERE (s0."id"::uuid = $5::uuid) RETURNING s0."id", s0."first_name", s0."last_name", s0."class", s0."section", s0."dob", s0."father_name", s0."mother_name", s0."roll_number", s0."password", s0."inserted_at", s0."updated_at"”}
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 3- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
kamaroly
@Sakthibalan do you have “ash-functions” in your
installed_extensionssection in theRepo?If not, add it and try again. Here is a sample code:
Sakthibalan
Yes, I had “ash-functions” already.
Sakthibalan
@kamaroly Sorry, I deleted
InstallAshFunctionsExtensionfile, after I restored this file. Everything is working well.Thank you so much!