Skip to content

Commit

Permalink
Chore: update code generators to latests changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mindreframer committed Nov 10, 2023
1 parent 8fe2c1c commit 6703ce4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 9 additions & 1 deletion gen/src/ApiGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,18 @@ export class ApiGenerator extends GenBase {
alias Surrealix.Config
alias Surrealix.Socket
alias Surrealix.SocketState
alias Surrealix.Util
defp exec_method(pid, {method, args, task}, opts \\\\ []) do
Socket.exec_method(pid, {method, args, task}, opts)
Socket.exec_method(pid, {method, args, task}, opts)
end
@doc """
Show all currently registered live queries (SQL)
"""
def all_live_queries(pid) do
:sys.get_state(pid) |> SocketState.all_lq()
end
@doc """
Expand Down
5 changes: 5 additions & 0 deletions gen/src/MainGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export class MainGenerator extends GenBase {
defdelegate start_link(opts \\\\ []), to: Socket
defdelegate stop(pid), to: Socket
@doc """
Show all currently registered live queries (SQL)
"""
defdelegate all_live_queries(pid), to: Api
@doc """
Convenience method, that combines sending an query (live_query) and registering a callback
Expand Down

0 comments on commit 6703ce4

Please sign in to comment.