{"id":18023702,"url":"https://github.com/katrix/dataprism","last_synced_at":"2025-03-27T00:30:45.146Z","repository":{"id":53852044,"uuid":"519849867","full_name":"Katrix/DataPrism","owner":"Katrix","description":"A new FRM with focus on Higher Kinded Data","archived":false,"fork":false,"pushed_at":"2025-03-16T18:51:55.000Z","size":13096,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T19:47:12.401Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dataprism.katsstuff.net/","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Katrix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-07-31T17:59:06.000Z","updated_at":"2025-03-16T18:51:59.000Z","dependencies_parsed_at":"2024-05-21T20:46:38.155Z","dependency_job_id":"6adef8c0-41f9-486f-b175-63c2a9cbe32d","html_url":"https://github.com/Katrix/DataPrism","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Katrix%2FDataPrism","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Katrix%2FDataPrism/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Katrix%2FDataPrism/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Katrix%2FDataPrism/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Katrix","download_url":"https://codeload.github.com/Katrix/DataPrism/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245760555,"owners_count":20667886,"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","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":[],"created_at":"2024-10-30T07:10:26.098Z","updated_at":"2025-03-27T00:30:44.686Z","avatar_url":"https://github.com/Katrix.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DataPrism\n\n*A new FRM with focus on Higher Kinded Data*\n\nDataPrism is an SQL query construction library built to take full advantage of\nthe power of higher kinded data. DataPrism builds\non [`perspective`](https://github.com/Katrix/perspective)\nand the tools it provides for programming with higher kinded data.\n\nThe power of higher kinded data makes DataPrism more flexible than other Scala SQL libraries.\nWant to sometimes leave out a column? You can do that. Want to return a List from a query?\nSure thing.\n\nDataPrism works with both Java's JDBC and Skunk.\n\nAdd DataPrism to your project by adding these statements to your `build.sbt` file.\n\n```scala\n// For JDBC\nlibraryDependencies += \"net.katsstuff\" %% \"dataprism-jdbc\" % \"{{versions.dataprism}}\"\n\n// For Skunk\nlibraryDependencies += \"net.katsstuff\" %% \"dataprism-skunk\" % \"{{versions.dataprism}}\"\n```\n\n*DataPrism is currently early in development, but feel free to try it out and\nreport bugs and errors.*\n\n## Showcase\n\nSee [the docs](https://dataprism.katsstuff.net/index.html) for a full explanation and walkthrough on\nhow to use DataPrism.\n\n```scala\n\n\ncase class HomeK[F[_]](\n  owner: F[UUID],\n  name: F[String],\n  createdAt: F[Instant],\n  updatedAt: F[Instant],\n  x: F[Double],\n  y: F[Double],\n  z: F[Double],\n  yaw: F[Float],\n  pitch: F[Float],\n  worldUuid: F[UUID]\n)\n\nobject HomeK {\n\n  import dataprism.jdbc.sql.JdbcType\n  import dataprism.jdbc.sql.PostgresJdbcTypes.*\n\n  val table: Table[HomeK, JdbcType] = Table(\n    \"homes\",\n    HomeK(\n      owner = Column(\"owner\", uuid),\n      name = Column(\"name\", text),\n      createdAt = Column(\"created_at\", javaTime.timestamptz),\n      updatedAt = Column(\"updated_at\", javaTime.timestamptz),\n      x = Column(\"x\", doublePrecision),\n      y = Column(\"y\", doublePrecision),\n      z = Column(\"z\", doublePrecision),\n      yaw = Column(\"yaw\", real),\n      pitch = Column(\"pitch\", real),\n      worldUuid = Column(\"world_uuid\", uuid)\n    )\n  )\n\n  given KMacros.ApplyTraverseKC[HomeK] = KMacros.deriveApplyTraverseKC[HomeK]\n}\n\n\nQuery.from(HomeK.table).map(homes =\u003e (homes.owner, homes.name))\n\nQuery\n  .from(HomeK.table)\n  .groupBy(homes =\u003e (homes.owner, homes.name))((grouped, homes) =\u003e\n    (\n      grouped._1,\n      grouped._2,\n      homes.x.arrayAgg,\n      homes.y.arrayAgg,\n      homes.z.arrayAgg\n    )\n  )\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatrix%2Fdataprism","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatrix%2Fdataprism","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatrix%2Fdataprism/lists"}