Files
2022-11-09 08:57:09 +01:00

1 line
6.1 KiB
JSON

{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"limit"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"limit"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"},{"kind":"text","text":", "},{"kind":"externalParam","text":"offset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"},{"kind":"text","text":"? = nil) -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/GRDB\/documentation\/GRDB\/QueryInterfaceRequest","preciseIdentifier":"s:4GRDB21QueryInterfaceRequestV","text":"QueryInterfaceRequest"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"RowDecoder"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The returned request fetches "},{"type":"codeVoice","code":"limit"},{"type":"text","text":" rows, starting at "},{"type":"codeVoice","code":"offset"},{"type":"text","text":". For"},{"type":"text","text":" "},{"type":"text","text":"example:"}]},{"type":"codeListing","syntax":"swift","code":["\/\/ SELECT * FROM player LIMIT 10","let request = Player.all().limit(10)","","\/\/ SELECT * FROM player LIMIT 10 OFFSET 20","let request = Player.all().limit(10, offset: 20)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Any previously applied limit is discarded."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/grdb\/queryinterfacerequest\/limit(_:offset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/GRDB\/documentation\/GRDB\/QueryInterfaceRequest\/limit(_:offset:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Returns a limited request."}],"kind":"symbol","metadata":{"role":"symbol","title":"limit(_:offset:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"limit"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"},{"kind":"text","text":", "},{"kind":"externalParam","text":"offset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"},{"kind":"text","text":"?) -> "},{"kind":"typeIdentifier","text":"QueryInterfaceRequest","preciseIdentifier":"s:4GRDB21QueryInterfaceRequestV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"RowDecoder"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:4GRDB21QueryInterfaceRequestV5limit_6offsetACyxGSi_SiSgtF","extendedModule":"GRDB","modules":[{"name":"GRDB"}]},"hierarchy":{"paths":[["doc:\/\/GRDB\/documentation\/GRDB","doc:\/\/GRDB\/documentation\/GRDB\/QueryInterface","doc:\/\/GRDB\/documentation\/GRDB\/QueryInterfaceRequest"]]},"seeAlsoSections":[{"title":"Instance Methods","identifiers":["doc:\/\/GRDB\/documentation\/GRDB\/QueryInterfaceRequest\/isEmpty(_:)"],"generated":true}],"references":{"doc://GRDB/documentation/GRDB/QueryInterfaceRequest":{"role":"symbol","title":"QueryInterfaceRequest","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"QueryInterfaceRequest"}],"abstract":[{"type":"text","text":"A request that builds SQL queries with Swift."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/QueryInterfaceRequest","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"QueryInterfaceRequest"}],"url":"\/documentation\/grdb\/queryinterfacerequest"},"doc://GRDB/documentation/GRDB/QueryInterfaceRequest/isEmpty(_:)":{"role":"symbol","title":"isEmpty(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"isEmpty"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Database","preciseIdentifier":"s:4GRDB8DatabaseC"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[{"type":"text","text":"Returns whether the requests does not match any row in the database."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/QueryInterfaceRequest\/isEmpty(_:)","kind":"symbol","type":"topic","url":"\/documentation\/grdb\/queryinterfacerequest\/isempty(_:)"},"doc://GRDB/documentation/GRDB":{"role":"collection","title":"GRDB","abstract":[{"type":"text","text":"A toolkit for SQLite databases, with a focus on application development"}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB","kind":"symbol","type":"topic","url":"\/documentation\/grdb"},"doc://GRDB/documentation/GRDB/QueryInterface":{"role":"collectionGroup","title":"Record Types and the Query Interface","abstract":[{"type":"text","text":"Record types and the query interface build SQL queries for you"}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/QueryInterface","kind":"article","type":"topic","url":"\/documentation\/grdb\/queryinterface"},"doc://GRDB/documentation/GRDB/QueryInterfaceRequest/limit(_:offset:)":{"role":"symbol","title":"limit(_:offset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"limit"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"},{"kind":"text","text":", "},{"kind":"externalParam","text":"offset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"},{"kind":"text","text":"?) -> "},{"kind":"typeIdentifier","text":"QueryInterfaceRequest","preciseIdentifier":"s:4GRDB21QueryInterfaceRequestV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"RowDecoder"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Returns a limited request."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/QueryInterfaceRequest\/limit(_:offset:)","kind":"symbol","type":"topic","url":"\/documentation\/grdb\/queryinterfacerequest\/limit(_:offset:)"}}}