mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
Enumerate columns in result_set
This commit is contained in:
parent
344804dd79
commit
5773faaa5c
2 changed files with 21 additions and 0 deletions
|
@ -41,6 +41,13 @@ module DB
|
|||
end
|
||||
end
|
||||
|
||||
# Iterates over all the columns
|
||||
def each_column
|
||||
column_count.times do |x|
|
||||
yield column_name(x), column_type(x)
|
||||
end
|
||||
end
|
||||
|
||||
# Move the next row in the result.
|
||||
# Return `false` if no more rows are available.
|
||||
# See `#each`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue