summaryrefslogtreecommitdiff
path: root/src/lua/stubs/database.lua
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-01-05 17:15:47 +1100
committerjacqueline <me@jacqueline.id.au>2024-01-05 17:15:47 +1100
commite12a68a74d9527d4becde122da4ff1ad6550564e (patch)
tree1d987e513efe693bc48817acbc0e89d7db044828 /src/lua/stubs/database.lua
parentaa1dd3d522aa60c2e8ec31ccc49b3459b4f0f8e2 (diff)
downloadtangara-fw-e12a68a74d9527d4becde122da4ff1ad6550564e.tar.gz
split lua stubs into one set for ldoc, and one set for lua-ls
Diffstat (limited to 'src/lua/stubs/database.lua')
-rw-r--r--src/lua/stubs/database.lua59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/lua/stubs/database.lua b/src/lua/stubs/database.lua
deleted file mode 100644
index 97359ab1..00000000
--- a/src/lua/stubs/database.lua
+++ /dev/null
@@ -1,59 +0,0 @@
---- Module for accessing and updating data about the user's library of tracks.
--- @module database
-
-local database = {}
-
---- Returns a list of all indexes in the database.
--- @treturn Array(Index)
-function database.indexes() end
-
---- An iterator is a userdata type that behaves like an ordinary Lua iterator.
--- @type Iterator
-local Iterator = {}
-
---- A TrackId is a unique identifier, representing a playable track in the
---- user's library.
--- @type TrackId
-local TrackId = {}
-
---- A record is an item within an Index, representing some value at a specific
---- depth.
--- @type Record
-local Record = {}
-
---- Gets the human-readable text representing this record. The `__tostring`
---- metatable function is an alias of this function.
--- @treturn string
-function Record:title() end
-
---- Returns the value that this record represents. This may be either a track
---- id, for records which uniquely identify a track, or it may be a new
---- Iterator representing the next level of depth for the current index.
----
---- For example, each Record in the "All Albums" index corresponds to an entire
---- album of tracks; the 'contents' of such a Record is an iterator returning
---- each track in the album represented by the Record. The contents of each of
---- the returned 'track' Records would be a full Track, as there is no further
---- disambiguation needed.
--- @treturn TrackId|Iterator(Record)
-function Record:contents() end
-
---- An index is heirarchical, sorted, view of the tracks within the database.
---- For example, the 'All Albums' index contains, first, a sorted list of every
---- album name in the library. Then, at the second level of the index, a sorted
---- list of every track within each album.
--- @type Index
-local Index = {}
-
---- Gets the human-readable name of this index. This is typically something
---- like "All Albums", or "Albums by Artist". The `__tostring` metatable
---- function is an alias of this function.
--- @treturn string
-function Index:name() end
-
---- Returns a new iterator that can be used to access every record within the
---- first level of this index.
--- @treturn Iterator(Record)
-function Index:iter() end
-
-return database