{"id":19311089,"url":"https://github.com/boxuk/finder","last_synced_at":"2025-06-11T00:05:59.158Z","repository":{"id":4238075,"uuid":"5362158","full_name":"boxuk/finder","owner":"boxuk","description":"Simple tool for forming SQL queries","archived":false,"fork":false,"pushed_at":"2013-05-21T08:18:47.000Z","size":198,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-22T14:40:07.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ULL-ESIT-GRADOII-PL/conversor-de-temperatura-simple-gabriel_alejandro","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boxuk.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}},"created_at":"2012-08-09T22:32:12.000Z","updated_at":"2015-02-10T06:08:26.000Z","dependencies_parsed_at":"2022-09-14T21:01:55.516Z","dependency_job_id":null,"html_url":"https://github.com/boxuk/finder","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Ffinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Ffinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Ffinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Ffinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boxuk","download_url":"https://codeload.github.com/boxuk/finder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Ffinder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259172960,"owners_count":22816557,"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-11-10T00:27:45.207Z","updated_at":"2025-06-11T00:05:59.123Z","avatar_url":"https://github.com/boxuk.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![Build Status](https://secure.travis-ci.org/rodnaph/finder.png?branch=master)](http://travis-ci.org/rodnaph/finder)\n\nFinder\n======\n\nFinder is a simple tool for creating query data for clojure.java.jdbc.  There is\n[Marginalia documentation](http://boxuk.github.com/finder/) available.\n\nUsage\n-----\n\nTo use Finder just import the library and use it inside your query.\n\n```clojure\n(ns my.namespace\n  (require [clojure.java.jdbc :as sql]\n           [finder.core :as f]))\n\n(sql/with-connection cnn\n  (sql/with-query-results res\n    (f/by-id :users 1)))\n```\n\nInstallation\n------------\n\nYou can install Finder with Leiningen and [Clojars](https://clojars.org/boxuk/finder).\n\n```\n[sql-finder \"x.x.x\"]\n```\n\nSee Clojars for latest version number.\n\nAnd/Or\n------\n\nBy default clauses are and'd together...\n\n```clojure\n(f/where :users {:name \"foo\"\n                 :email \"blah\"})\n```\n\nBut you can specify or'd groups just by using a vector..\n\n```clojure\n(f/where :users [{:last_name \"bar\"}\n                 {:first_name \"foo\"}])\n```\n\nMultiple Values\n---------------\n\nYou can also do SQL 'in' clauses using a set.\n\n```clojure\n(f/where :users {:id #{1 2 3}}\n```\n\nWhich will create _id in (1 2 3)_ (the _in_ operator isn't actually\nsupported by JDBC prepared statements, so its appoximated by Finder\njust using a series of comparisons).\n\nFinder tries to do what you _probably mean_ when it comes to empty\nsets.  So doing _{:id #{}}_ will translate to _(1 = 0)_ (ie. not\nmatching anything, rather than it being ommitted and matching\neverything instead).\n\nOrder/Limit/Offset\n------------------\n\nThe third argument to _where_ allows you to specify extra options\nlike ordering results, limiting, and offsetting.\n\n```clojure\n(f/where :users {} {:order :name})\n(f/where :users {} {:order {:name asc :email :desc}\n                    :limit 10})\n(f/where :emails {:user_id 1}\n                 {:limit 20\n                  :offset 10})\n```\n\nCustom Comparators\n------------------\n\nBy default field values are matched with =, but you can specify\nanother operator if you like using a vector.\n\n```clojure\n(f/where :users {:age ['\u003c 50]})\n```\n\nFunction API\n------------\n\n```clojure\n(f/where TABLE PARAM_MAP OPTS)\n(f/by TABLE FIELD ID OPTS)\n(f/by-id TABLE ID)\n(f/all TABLE OPTS)\n```\n\nUnit Tests\n----------\n\nUnit tests can be run with Midje (lein-midje plugin required)\n\n```\nlein midje\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxuk%2Ffinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboxuk%2Ffinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxuk%2Ffinder/lists"}