Skip to content

Commit f8b3a9c

Browse files
committed
Add columns(db, table) command to return the columns of a table
1 parent ca1b2e5 commit f8b3a9c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/SQLite.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ function indices(db::SQLiteDB)
246246
query(db,"SELECT name FROM sqlite_master WHERE type='index';")
247247
end
248248

249+
columns(db::SQLiteDB,table::String) = query(db,"pragma table_info($table)")
250+
249251
# Transaction-based commands
250252
function transaction(db, mode="DEFERRED")
251253
#=

0 commit comments

Comments
 (0)