Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update supabase to v2.1.0 #217

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Update supabase to v2.1.0 #217

merged 1 commit into from
Jan 31, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 30, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
io.github.jan-tennert.supabase:postgrest-kt 2.0.4 -> 2.1.0 age adoption passing confidence
io.github.jan-tennert.supabase:realtime-kt 2.0.4 -> 2.1.0 age adoption passing confidence
io.github.jan-tennert.supabase:gotrue-kt 2.0.4 -> 2.1.0 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the warning logs for more information.


Release Notes

supabase-community/supabase-kt (io.github.jan-tennert.supabase:postgrest-kt)

v2.1.0

Compare Source

Notes

The documentation has been updated accordingly.
It might take a bit to appear on Maven Central, as publishing seems to be broken right now

Changes

Add iOS targets to the chat-demo by @​hieuwu in #​397

Realtime

Note: For both methods, the flows automatically emit the initial data and then listen for events using the existing methods.
Listen for changes in all messages (handles inserts, updates and deletes automatically and emits the updated list)

val messageFlow: Flow<List<Message>> = channel.postgresListDataFlow<Message>( //provide your serializable type (in this case Message)
    table = "messages",
    filter = FilterOperation("id", FilterOperator.IN, listOf(1, 2, 3, 4)), //optional filter
    primaryKey = Message::id //provide the primary key for caching
)

Listen for changes on a single value

val singleMessageFlow: Flow<Message> = channel.postgresSingleDataFlow<Message>( //Automatically emits the updated message and closes on delete
    table = "messages",
    primaryKey = Message::id
) { //this is the same filter builder the Postgrest plugin uses, so you can use everything:
    Message::id eq 2
    or {
        Message::creatorId isIn listOf("1", "2", "3")
        Message::content like "%test%"
    }
}

Listen to presence changes (joins & leaves are handled automatically)

val presenceFlow: Flow<List<User>> = channel.presenceDataFlow<User>()
  • Add a new method for adding a filter to postgres changes:
supabase.channel("channel").postgresChangeFlow<PostgresAction>("public") {
    //Still only one filter supported
    filter("id", FilterOperator.EQ, 2)
    //Note that some values get converted to strings e.g. the List<Int> to (1,2,3)
    filter("id", FilterOperator.IN, listOf(1, 2, 3, 4))
}

New methods:

  • RealtimeChannel#postgresSingleDataFlow
  • RealtimeChannel#postgresListDataFlow
  • RealtimeChannel#presenceDataFlow
  • RealtimeChannelBuilder#filter
GoTrue
Compose Auth
Postgrest

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Jan 30, 2024
Copy link

coderabbitai bot commented Jan 30, 2024

Important

Auto Review Skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@tatsutakein tatsutakein merged commit 3b139b0 into main Jan 31, 2024
8 checks passed
@tatsutakein tatsutakein deleted the renovate/supabase branch January 31, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant