{"id":23223356,"url":"https://github.com/imantung/sqlstr","last_synced_at":"2025-08-19T12:31:04.357Z","repository":{"id":45197986,"uuid":"187883762","full_name":"imantung/sqlstr","owner":"imantung","description":"String manipulation/helper for SQL Query","archived":false,"fork":false,"pushed_at":"2022-01-01T12:28:56.000Z","size":7,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-19T05:59:45.299Z","etag":null,"topics":["sql-cleaner","sql-obsecurer","sql-parser","sql-table","sqlquery","string-manipulation"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/imantung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-21T17:24:58.000Z","updated_at":"2024-01-09T13:17:35.000Z","dependencies_parsed_at":"2022-09-02T12:00:25.831Z","dependency_job_id":null,"html_url":"https://github.com/imantung/sqlstr","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/imantung%2Fsqlstr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imantung%2Fsqlstr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imantung%2Fsqlstr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imantung%2Fsqlstr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imantung","download_url":"https://codeload.github.com/imantung/sqlstr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230351117,"owners_count":18212790,"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":["sql-cleaner","sql-obsecurer","sql-parser","sql-table","sqlquery","string-manipulation"],"created_at":"2024-12-18T23:17:08.752Z","updated_at":"2024-12-18T23:17:09.395Z","avatar_url":"https://github.com/imantung.png","language":"Go","readme":"# SQLSTR\n\nString manipulation/helper for SQL Query.\n\n## Examples\n\n### Clean Query from double white space, comment, etc.\n\n```go\ncleaned := sqlstr.Clean(`\n  SELECT *\n  FROM table -- some table comment \n  WHERE column1 = 'meh' /* request from tyrion*/`)\n\nfmt.Println(cleaned) \n\n// Output: \n// SELECT * FROM table WHERE column1 = 'meh'\n```\n### Obscure value \n\n```go\nobsecured := sqlstr.Obscure(`SELECT * FROM table WHERE column1 = 'text' AND column2 = 1234 AND column3 = TRUE and column4 = 3.14`)\n\nfmt.Println(obsecured)\n\n// Output: \n// SELECT * FROM table WHERE column1 = ? AND column2 = ? AND column3 = ? and column4 = ?\n```\n\n### Get Table Names\n\n```go\nqueryString := sqlstr.NewQueryString(`SELECT column_name(s)\nFROM table1\nLEFT JOIN table2\nON table1.column_name = table2.column_name;`)\n\ntableNames := queryString.TableNames()\n\nfmt.Println(tableNames)\n\n// Output:\n// [table1 table2]\n```\n\n## Author \n\niman.tung@gmail.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimantung%2Fsqlstr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimantung%2Fsqlstr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimantung%2Fsqlstr/lists"}