{"id":20596945,"url":"https://github.com/petdance/sql-tiny","last_synced_at":"2025-03-06T15:18:32.751Z","repository":{"id":66709746,"uuid":"174726672","full_name":"petdance/sql-tiny","owner":"petdance","description":"SQL::Tiny, a tiny Perl module for making very simple SQL statements","archived":false,"fork":false,"pushed_at":"2023-07-05T03:41:40.000Z","size":37,"stargazers_count":0,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-01-17T00:53:02.888Z","etag":null,"topics":["perl","sql","sql-statements"],"latest_commit_sha":null,"homepage":"","language":"Perl","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/petdance.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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":"2019-03-09T17:44:15.000Z","updated_at":"2023-07-07T19:31:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"34c397be-8820-4fe6-b407-5d40fc4f4bf0","html_url":"https://github.com/petdance/sql-tiny","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petdance%2Fsql-tiny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petdance%2Fsql-tiny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petdance%2Fsql-tiny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petdance%2Fsql-tiny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petdance","download_url":"https://codeload.github.com/petdance/sql-tiny/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242231441,"owners_count":20093636,"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":["perl","sql","sql-statements"],"created_at":"2024-11-16T08:19:34.924Z","updated_at":"2025-03-06T15:18:32.732Z","avatar_url":"https://github.com/petdance.png","language":"Perl","readme":"# SQL::Tiny, a Perl module for generating simple SQL statements\n\nA very simple SQL-building library.  It's not for all your SQL needs,\nonly the very simple ones.\n\nIt doesn't handle JOINs.  It doesn't handle subselects.  It's only for simple SQL.\n\n    my ($sql,$binds) = sql_select( 'users', [ 'name', 'status' ], { status =\u003e [ 'Deleted', 'Inactive' ] }, { order_by =\u003e 'name' } );\n\n    my ($sql,$binds) = sql_insert( 'users', { name =\u003e 'Dave', status =\u003e 'Active' } );\n\n    my ($sql,$binds) = sql_update( 'users', { status =\u003e 'Inactive' }, { password =\u003e undef } );\n\n    my ($sql,$binds) = sql_delete( 'users', { status =\u003e 'Inactive' } );\n\nIn my test suites, I have a lot of ad hoc SQL queries, and it drives me\nnuts to have so much SQL code lying around.  SQL::Tiny is for generating\nSQL code for simple cases.\n\nI'd far rather have:\n\n    my ($sql,$binds) = sql_insert(\n        'users',\n        {\n            name      =\u003e 'Dave',\n            salary    =\u003e 50000,\n            status    =\u003e 'Active',\n            dateadded =\u003e \\'SYSDATE()',\n        }\n    );\n\nthan hand-coding:\n\n    my $sql   = 'INSERT INTO users (name,salary,status,dateadded) VALUES (:name,:status,:salary,SYSDATE())';\n    my $binds = {\n        ':name'      =\u003e 'Dave',\n        ':salary'    =\u003e 50000,\n        ':status'    =\u003e 'Active',\n        ':dateadded' =\u003e \\'SYSDATE()',\n    };\n\nor even the positional:\n\n    my $sql   = 'INSERT INTO users (name,salary,status,dateadded) VALUES (?,?,?,SYSDATE())';\n    my $binds = [ 'Dave', 50000, 'Active' ];\n\n# Build status of dev branch\n\n[![Build Status](https://github.com/petdance/sql-tiny/workflows/testsuite/badge.svg?branch=dev)](https://github.com/petdance/sql-tiny/actions?query=workflow%3Atestsuite+branch%3Adev)\n* [CPAN Testers](https://cpantesters.org/distro/S/sql-tiny.html)\n\n# Installation\n\nTo install this module, run the following commands:\n\n    perl Makefile.PL\n    make\n    make test\n    make install\n\n# Support and Documentation\n\nAfter installing, you can find documentation for this module with the\nperldoc command.\n\n    perldoc SQL::Tiny\n\nYou can also look for information at:\n\n* MetaCPAN\n    * https://metacpan.org/release/SQL-Tiny\n\n* Project home page\n    * https://github.com/petdance/sql-tiny\n\n* Project issue tracker\n    * https://github.com/petdance/sql-tiny/issues\n\n# License and Copyright\n\nCopyright (C) 2019-2020 Andy Lester\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of the the\n[Artistic License 2.0](https://www.perlfoundation.org/artistic-license-20.html).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetdance%2Fsql-tiny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetdance%2Fsql-tiny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetdance%2Fsql-tiny/lists"}