{"id":21040569,"url":"https://github.com/pixelspark/rethink-swift","last_synced_at":"2025-05-15T16:33:22.376Z","repository":{"id":46179882,"uuid":"44047267","full_name":"pixelspark/rethink-swift","owner":"pixelspark","description":"A RethinkDB client driver for Swift","archived":true,"fork":false,"pushed_at":"2017-06-23T11:40:38.000Z","size":268,"stargazers_count":76,"open_issues_count":4,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T20:14:51.399Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pixelspark.nl/2015/rethink-swift-a-swift-driver-for-rethinkdb","language":"Objective-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/pixelspark.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":"2015-10-11T10:04:22.000Z","updated_at":"2023-08-01T21:50:15.000Z","dependencies_parsed_at":"2022-09-21T06:07:08.097Z","dependency_job_id":null,"html_url":"https://github.com/pixelspark/rethink-swift","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelspark%2Frethink-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelspark%2Frethink-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelspark%2Frethink-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelspark%2Frethink-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixelspark","download_url":"https://codeload.github.com/pixelspark/rethink-swift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254377455,"owners_count":22061140,"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-19T13:47:11.087Z","updated_at":"2025-05-15T16:33:22.077Z","avatar_url":"https://github.com/pixelspark.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Rethink.swift\n-------------\n\nA client driver for RethinkDB in Swift.\n\nLooking for a Mac app to easily query RethinkDB? Convert and analyze large data sets at the speed of light with [Warp](http://warp.one). \n\n### Usage\n\n```swift\nR.connect(URL(string: \"rethinkdb://localhost:28016\")!, user: \"admin\", password: \"\") { err, connection in\n\tassert(err == nil, \"Connection error: \\(err)\")\n\n\t// Connected!\n\tR.dbCreate(databaseName).run(connection) { response in\n\t\tassert(!response.isError, \"Failed to create database: \\(response)\")\n\n\t\tR.db(databaseName).tableCreate(tableName).run(connection) { response in\n\t\t\tassert(!response.isError, \"Failed to create table: \\(response)\")\n\n\t\t\tR.db(databaseName).table(tableName).indexWait().run(connection) { response in\n\t\t\t\tassert(!response.isError, \"Failed to wait for index: \\(response)\")\n\n\t\t\t\t// Insert 1000 documents\n\t\t\t\tvar docs: [ReDocument] = []\n\t\t\t\tfor i in 0..\u003c1000 {\n\t\t\t\t\tdocs.append([\"foo\": \"bar\", \"id\": i])\n\t\t\t\t}\n\n\t\t\t\tR.db(databaseName).table(tableName).insert(docs).run(connection) { response in\n\t\t\t\t\tassert(!response.isError, \"Failed to insert data: \\(response)\")\n\n\t\t\t\t\tR.db(databaseName).table(tableName).filter({ r in return r[\"foo\"].eq(R.expr(\"bar\")) }).run(connection) { response in \n\t\t\t\t\t\t...\n\t\t\t\t\t}\n\n\t\t\t\t\tR.db(databaseName).table(tableName).count().run(connection) { response in\n\t\t\t\t\t\t...\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\n### Status\n\nThe driver implements the V1_0 protocol (which supports username/password authentication using SCRAM, and is available \nfrom RethinkDB 2.3.0). Alternatively, you can also use V0_4. Some commands and optional arguments may still be missing,\nbut are usually easy to add to the code.\n\nThe driver is written for Swift 3. The last version working in Swift 2.2 can be found at the tag 'last-swift2'.\n\n### Installation\n\n#### Swift Package Manager (SPM)\n\nYou can install the driver using Swift Package Manager by adding the following line to your ```Package.swift``` as a dependency:\n\n```\n.Package(url: \"https://github.com/pixelspark/rethink-swift.git\", majorVersion: 1)\n```\n\nTo use the driver in an Xcode project, generate an Xcode project file using SPM:\n```\nswift package generate-xcodeproj\n```\nOpen the Xcode project file and open the .xcconfig file located under the Config folder and add the following Objective-C build settings:\n```\nCLANG_ENABLE_MODULES = YES\nCLANG_ENABLE_OBJC_ARC = YES\nHEADER_SEARCH_PATHS = $(inherited) \"$(SRCROOT)/Packages/**\"\n```\n\n#### Manual\n\nDrag Rethink.xcodeproj into your own project, then add Rethink or Rethink iOS as dependency (build targets) and link to it.\nYou should then be able to simply 'import Rethink' from Swift code.\n\n### License\n\n```\nRethink.swift. Copyright (c) 2015-2016 Pixelspark\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n```\n\n### FAQ\n\n- __Can I contribute?__\n\nFeel free to send a pull request. If you want to implement a new feature, please open\nan issue first, especially if it's a non backward compatible one.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelspark%2Frethink-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelspark%2Frethink-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelspark%2Frethink-swift/lists"}