mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
1 line
5.1 KiB
JSON
1 line
5.1 KiB
JSON
{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"dropLast"},{"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":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"An array leaving off the last element of the cursor."}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The following example drops the last element from a cursor of integers."}]},{"type":"codeListing","syntax":null,"code":["let numbers = AnyCursor([1, 2, 3, 4, 5])","try print(numbers.dropLast())","\/\/ Prints \"[1, 2, 3, 4]\""]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If the cursor has no elements, the result is an empty cursor."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/grdb\/sqlstatementcursor\/droplast()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/GRDB\/documentation\/GRDB\/SQLStatementCursor\/dropLast()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Returns an array containing all but the last element of the cursor."}],"kind":"symbol","metadata":{"role":"symbol","title":"dropLast()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"dropLast"},{"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:4GRDB6CursorPAAE8dropLastSay7ElementQzGyKF::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/SQLStatementCursor/dropLast()":{"role":"symbol","title":"dropLast()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"dropLast"},{"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 containing all but the last element of the cursor."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/SQLStatementCursor\/dropLast()","kind":"symbol","type":"topic","url":"\/documentation\/grdb\/sqlstatementcursor\/droplast()"},"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"},"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/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"}}} |