{"id":13879459,"url":"https://github.com/DatabaseCleaner/database_cleaner-sequel","last_synced_at":"2025-07-16T15:32:22.193Z","repository":{"id":43339051,"uuid":"58895479","full_name":"DatabaseCleaner/database_cleaner-sequel","owner":"DatabaseCleaner","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-08T19:54:29.000Z","size":1122,"stargazers_count":17,"open_issues_count":15,"forks_count":11,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-17T14:19:44.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/DatabaseCleaner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-16T01:51:23.000Z","updated_at":"2023-09-22T07:58:49.000Z","dependencies_parsed_at":"2022-09-03T04:40:58.895Z","dependency_job_id":null,"html_url":"https://github.com/DatabaseCleaner/database_cleaner-sequel","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatabaseCleaner%2Fdatabase_cleaner-sequel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatabaseCleaner%2Fdatabase_cleaner-sequel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatabaseCleaner%2Fdatabase_cleaner-sequel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatabaseCleaner%2Fdatabase_cleaner-sequel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DatabaseCleaner","download_url":"https://codeload.github.com/DatabaseCleaner/database_cleaner-sequel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226143895,"owners_count":17580245,"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-08-06T08:02:21.770Z","updated_at":"2024-11-24T08:31:21.574Z","avatar_url":"https://github.com/DatabaseCleaner.png","language":"Ruby","readme":"# Database Cleaner Adapter for Sequel\n\n[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-sequel.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-sequel)\n[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-sequel/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-sequel)\n[![codecov](https://codecov.io/gh/DatabaseCleaner/database_cleaner-sequel/branch/master/graph/badge.svg)](https://codecov.io/gh/DatabaseCleaner/database_cleaner-sequel)\n\nClean your Sequel databases with Database Cleaner.\n\nSee https://github.com/DatabaseCleaner/database_cleaner for more information.\n\n## Installation\n\n```ruby\n# Gemfile\ngroup :test do\n  gem 'database_cleaner-sequel'\nend\n```\n\n```ruby\n# test_helper.rb\nDatabaseCleaner[:sequel].strategy = :transaction\n\nclass Minitest::Spec\n  before :each do\n    DatabaseCleaner[:sequel].start\n  end\n\n  after :each do\n    DatabaseCleaner[:sequel].clean\n  end\nend\n```\n\n## Supported Strategies\n\nThree strategies are supported:\n\n* Transaction (default)\n* Truncation\n* Deletion\n\n## Strategy configuration options\n\nThe transaction strategy accepts no options.\n\nThe truncation and deletion strategies may accept the following options:\n\n* `:only` and `:except` may take a list of table names:\n\n```ruby\n# Only truncate the \"users\" table.\nDatabaseCleaner[:sequel].strategy = :truncation, only: [\"users\"]\n\n# Delete all tables except the \"users\" table.\nDatabaseCleaner[:sequel].strategy = :deletion, except: [\"users\"]\n```\n\n* `:pre_count` - When set to `true`, this will check each table for existing rows before truncating or deleting it. This can speed up test suites when many of the tables are never populated. Defaults to `false`.\n\n## Adapter configuration options\n\n`#db` defaults to the default Sequel database, but can be specified manually in a few ways:\n\n```ruby\n# Sequel connection object\nDatabaseCleaner[:sequel].db = Sequel.connect(uri)\n\n# Back to default:\nDatabaseCleaner[:sequel].db = :default\n\n# Multiple Sequel databases can be specified:\nDatabaseCleaner[:sequel, db: :default]\nDatabaseCleaner[:sequel, db: Sequel.connect(uri)]\n```\n## COPYRIGHT\n\nSee [LICENSE](LICENSE) for details.\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDatabaseCleaner%2Fdatabase_cleaner-sequel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDatabaseCleaner%2Fdatabase_cleaner-sequel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDatabaseCleaner%2Fdatabase_cleaner-sequel/lists"}