{"id":18473492,"url":"https://github.com/werner/fuzzyquery","last_synced_at":"2025-08-20T16:06:20.389Z","repository":{"id":7741091,"uuid":"9107937","full_name":"werner/fuzzyquery","owner":"werner","description":null,"archived":false,"fork":false,"pushed_at":"2018-09-11T13:23:43.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T19:23:48.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/werner.png","metadata":{"files":{"readme":"README.rdoc","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":"2013-03-29T22:37:29.000Z","updated_at":"2018-09-11T13:23:44.000Z","dependencies_parsed_at":"2022-07-08T03:20:35.584Z","dependency_job_id":null,"html_url":"https://github.com/werner/fuzzyquery","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werner%2Ffuzzyquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werner%2Ffuzzyquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werner%2Ffuzzyquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werner%2Ffuzzyquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/werner","download_url":"https://codeload.github.com/werner/fuzzyquery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850874,"owners_count":21973671,"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-06T10:25:16.194Z","updated_at":"2025-05-13T00:46:37.944Z","avatar_url":"https://github.com/werner.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"== FuzzyQuery\nA library to include sqlf parsing to PostgreSQL 8.2 and above\n\nIt just translates SQLf to SQL.\n\nSQLf is an extension to SQL to include {Fuzzy Logic}[http://en.wikipedia.org/wiki/Fuzzy_logic].\n\n== Install\n\nIt works on Linux\n\nDownload the fuzzyquery.so and fuzzyquery.sql files, then modify the sql file where it writes $libdir/fuzzyquery, \nchange it to the path where you downloaded the library file.\n\n== Quick Start:\n\n\n  CREATE TABLE people (name character varying(50),age int);\n  INSERT INTO people VALUES ('Peter',15);\n  INSERT INTO people VALUES ('John',19);\n  INSERT INTO people VALUES ('Richard',35);\n  INSERT INTO people VALUES ('Michael',55);\n  INSERT INTO people VALUES ('Joseph',53);\n\n  SELECT fuzzy.sqlf('CREATE FUZZY PREDICATE young ON 0 .. 120 AS (0,0,20,30)'::text);\n  SELECT fuzzy.sqlf('CREATE FUZZY PREDICATE old ON 0 .. 120 AS (50,60,INFINIT,INFINIT)'::text);\n\n  SELECT * FROM fuzzy.sqlf('SELECT name FROM people WHERE age=young ORDER BY name'::text) AS (name character varying, membdg float);\n  SELECT * FROM fuzzy.sqlf('SELECT name FROM people WHERE age=old ORDER BY name'::text) AS (name character varying, membdg float);\n\n\nA fuzzy predicate is an expression you can use as a filter in a range of values.\nIn a fuzzy predicate we have two borders defined as minimum and maximum values, \nand the cores are the complete inclusion of the fuzzy predicate in the range.\n\nIn the code above you create a young person like this:\nage range: 0..120\u003c\nminimum number:0\nfirst core:0\nsecond core:20\nmaximum number:30\n\nThe old person has an infinite value as a second core and maximum value.\n\n== Install from sources\nI build this library in order to be a contrib module someday. \nSo to install it you need to download PostgreSQL from sources, \ncreate a folder in contrib and include it in the Makefile of the contrib folder, \nthen you can do make and make install and follow the instructions to install any other contrib module.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwerner%2Ffuzzyquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwerner%2Ffuzzyquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwerner%2Ffuzzyquery/lists"}