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

1 line
5.9 KiB
JSON

{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"suffix"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"maxLength"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ["},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Element"},{"kind":"text","text":"]"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"maxLength","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The maximum number of elements to return. The"},{"type":"text","text":" "},{"type":"text","text":"value of "},{"type":"codeVoice","code":"maxLength"},{"type":"text","text":" must be greater than or equal to zero."}]}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The cursor must be finite. If the maximum length exceeds the number of"},{"type":"text","text":" "},{"type":"text","text":"elements in the cursor, the result contains all the elements in the"},{"type":"text","text":" "},{"type":"text","text":"cursor."}]},{"type":"codeListing","syntax":null,"code":["let numbers = AnyCursor([1, 2, 3, 4, 5])","try print(numbers.suffix(2))","\/\/ Prints \"[4, 5]\"","try print(numbers.suffix(10))","\/\/ Prints \"[1, 2, 3, 4, 5]\""]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/grdb\/sqlstatementcursor\/suffix(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/GRDB\/documentation\/GRDB\/SQLStatementCursor\/suffix(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Returns an array, up to the given maximum length, containing the"},{"type":"text","text":" "},{"type":"text","text":"final elements of the cursor."}],"kind":"symbol","metadata":{"role":"symbol","title":"suffix(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"suffix"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ["},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Element"},{"kind":"text","text":"]"}],"symbolKind":"method","externalID":"s:4GRDB6CursorPAAE6suffixySay7ElementQzGSiKF::SYNTHESIZED::s:4GRDB18SQLStatementCursorC","extendedModule":"GRDB","modules":[{"name":"GRDB"}]},"hierarchy":{"paths":[["doc:\/\/GRDB\/documentation\/GRDB","doc:\/\/GRDB\/documentation\/GRDB\/DatabaseConnections","doc:\/\/GRDB\/documentation\/GRDB\/Database","doc:\/\/GRDB\/documentation\/GRDB\/SQLStatementCursor","doc:\/\/GRDB\/documentation\/GRDB\/SQLStatementCursor\/Cursor-Implementations"]]},"references":{"doc://GRDB/documentation/GRDB/DatabaseConnections":{"role":"collectionGroup","title":"Database Connections","abstract":[{"type":"text","text":"Open database connections to SQLite databases."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/DatabaseConnections","kind":"article","type":"topic","url":"\/documentation\/grdb\/databaseconnections"},"doc://GRDB/documentation/GRDB/SQLStatementCursor/Cursor-Implementations":{"role":"collectionGroup","title":"Cursor Implementations","abstract":[],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/SQLStatementCursor\/Cursor-Implementations","kind":"article","type":"topic","url":"\/documentation\/grdb\/sqlstatementcursor\/cursor-implementations"},"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/SQLStatementCursor/suffix(_:)":{"role":"symbol","title":"suffix(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"suffix"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ["},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Element"},{"kind":"text","text":"]"}],"abstract":[{"type":"text","text":"Returns an array, up to the given maximum length, containing the"},{"type":"text","text":" "},{"type":"text","text":"final elements of the cursor."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/SQLStatementCursor\/suffix(_:)","kind":"symbol","type":"topic","url":"\/documentation\/grdb\/sqlstatementcursor\/suffix(_:)"},"doc://GRDB/documentation/GRDB/SQLStatementCursor":{"role":"symbol","title":"SQLStatementCursor","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"SQLStatementCursor"}],"abstract":[{"type":"text","text":"A cursor over all statements in an SQL string."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/SQLStatementCursor","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SQLStatementCursor"}],"url":"\/documentation\/grdb\/sqlstatementcursor"},"doc://GRDB/documentation/GRDB/Database":{"role":"symbol","title":"Database","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Database"}],"abstract":[{"type":"text","text":"An SQLite connection."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/Database","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Database"}],"url":"\/documentation\/grdb\/database"}}}