# File lib/dbd/sqlite/database.rb, line 117
117:     def columns(tablename)
118:         return nil unless tablename and tablename.kind_of? String
119: 
120:         sth = prepare("PRAGMA table_info(?)")
121:         sth.bind_param(1, tablename)
122:         sth.execute
123:         columns = [ ]
124:         while row = sth.fetch
125:             column = { }
126:             column["name"] = row[1]
127: 
128:             m = DBI::DBD::SQLite.parse_type(row[2])
129:             column["type_name"] = m[1]
130:             column["precision"] = m[3].to_i if m[3]
131:             column["scale"]     = m[5].to_i if m[5]
132: 
133:             column["nullable"]  = row[3].to_i == 0
134:             column["default"]   = row[4]
135:             columns.push column
136:         end
137: 
138:         sth.finish
139:         return columns
140:         # XXX it'd be nice if the spec was changed to do this k/v with the name as the key.
141:     end