xineohpanihc 发表于 2013-1-30 01:06:52

SQLite/Ruby FAQ --转

 
SQLite/Ruby FAQ

<div class="faq-list">

[*]How do I do a database query?

[*]I just want an array of the rows…
[*]I’d like to use a block to iterate through the rows…
[*]I need to get the column names as well as the rows…
[*]I just want the first row of the result set…
[*]I just want the first value of the first row of the result set…

[*]How do I prepare a statement for repeated execution?
[*]How do I use placeholders in an SQL statement?
[*]How do I discover metadata about a query?
[*]I’d like the rows to be indexible by column name.
[*]I’d like the values from a query to be the correct types, instead of String.
[*]How do insert binary data into the database?
[*]How do I do a DDL (insert, update, delete) statement?
[*]How do I execute multiple statements in a single string?
[*]How do I begin/end a transaction?
页: [1]
查看完整版本: SQLite/Ruby FAQ --转