{"id":21023211,"url":"https://github.com/simerplaha/swaydb.kotlin.examples","last_synced_at":"2026-05-20T06:38:22.877Z","repository":{"id":57720376,"uuid":"166227234","full_name":"simerplaha/SwayDB.kotlin.examples","owner":"simerplaha","description":"Kotlin examples for SwayDB","archived":false,"fork":false,"pushed_at":"2023-11-30T00:38:10.000Z","size":147,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-13T18:14:35.154Z","etag":null,"topics":["kotlin","storage-engine"],"latest_commit_sha":null,"homepage":"https://swaydb.simer.au","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simerplaha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["simerplaha"]}},"created_at":"2019-01-17T13:06:52.000Z","updated_at":"2023-09-23T15:33:34.000Z","dependencies_parsed_at":"2025-01-20T13:32:05.229Z","dependency_job_id":"adb121ff-2f92-4b98-9687-f28d4e2d6c63","html_url":"https://github.com/simerplaha/SwayDB.kotlin.examples","commit_stats":null,"previous_names":["simerplaha/swaydb.kotlin"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/simerplaha/SwayDB.kotlin.examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simerplaha%2FSwayDB.kotlin.examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simerplaha%2FSwayDB.kotlin.examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simerplaha%2FSwayDB.kotlin.examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simerplaha%2FSwayDB.kotlin.examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simerplaha","download_url":"https://codeload.github.com/simerplaha/SwayDB.kotlin.examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simerplaha%2FSwayDB.kotlin.examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28124442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-30T02:00:05.476Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kotlin","storage-engine"],"created_at":"2024-11-19T11:17:13.285Z","updated_at":"2025-12-30T07:03:20.387Z","avatar_url":"https://github.com/simerplaha.png","language":"Kotlin","funding_links":["https://github.com/sponsors/simerplaha"],"categories":[],"sub_categories":[],"readme":"# SwayDB.kotlin.examples [![Slack Chat][slack-badge]][slack-link] [![Gitter Chat][gitter-badge]][gitter-link] [![Build status][build-badge]][build-link] [![Maven central][maven-badge]][maven-link]\r\n\r\n[gitter-badge]: https://badges.gitter.im/Join%20Chat.svg\r\n[gitter-link]: https://gitter.im/SwayDB-chat/Lobby\r\n\r\n[slack-badge]: https://img.shields.io/badge/slack-join%20chat-e01563.svg\r\n[slack-link]: https://join.slack.com/t/swaydb/shared_invite/enQtNzI1NzM1NTA0NzQxLTJiNjRhMDg2NGQ3YzBkNGMxZGRmODlkN2M3MWEwM2U2NWY1ZmU5OWEyYTgyN2ZhYjlhNjdlZTM3YWJjMGZmNzQ\r\n\r\n[maven-badge]: https://img.shields.io/maven-central/v/io.swaydb/java_2.12.svg\r\n[maven-link]: https://search.maven.org/search?q=g:io.swaydb%20AND%20a:java_2.12\r\n\r\n[build-badge]: https://github.com/simerplaha/SwayDB.kotlin.examples/workflows/Java%20CI/badge.svg\r\n[build-link]: https://github.com/simerplaha/SwayDB.kotlin.examples/actions?query=workflow%3A%22Java+CI%22\r\n\r\nImplements examples demoing [SwayDB](https://github.com/simerplaha/SwayDB)'s API.\r\n\r\n### Quick start example.\r\n\r\nSee full [QuickStart.kt](/src/main/kotlin/quickstart/QuickStartMapSimple.kt).\r\n\r\n```kotlin\r\nval map =\r\n  MapConfig\r\n    .functionsOff(intSerializer(), intSerializer())\r\n    .get()\r\n\r\nmap.put(1, 1) //basic put\r\nmap[1].get() //basic get\r\nmap.expire(1, Duration.ofSeconds(1)) //basic expire\r\nmap.remove(1) //basic remove\r\n\r\n//atomic write a Stream of key-value\r\nmap.put(Stream.range(1, 100).map { KeyVal.create(it) })\r\n\r\n//Create a stream that updates all values within range 10 to 90.\r\nval updatedKeyValues =\r\n  map\r\n    .from(10)\r\n    .stream()\r\n    .takeWhile { it.key() \u003c= 90 }\r\n    .map { KeyVal.create(it.key(), it.value() + 5000000) }\r\n\r\n//submit the stream to update the key-values as a single transaction.\r\nmap.put(updatedKeyValues)\r\n\r\n//print all key-values to view the update.\r\nmap\r\n  .stream()\r\n  .forEach(::println)\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimerplaha%2Fswaydb.kotlin.examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimerplaha%2Fswaydb.kotlin.examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimerplaha%2Fswaydb.kotlin.examples/lists"}