TDSii
TDSii

Reputation: 1725

Android SQLite result to Array

I've been playing around with android sqlite and I noticed it uses a cursor. Is their a function that takes query as input and returns a 2D array for all results.

I come from php and its a lot more easy, but i can't find any similar function any where!

Upvotes: 0

Views: 536

Answers (1)

Dan S
Dan S

Reputation: 9189

No, the Cursor is what is used for all database query results. The Cursor object is beneficial to Java because it is a strongly-typed language. PHP uses dynamic weak typing which lends itself to that kind of SQL query response. Also there are memory considerations that a Cursor will solve by being able to see only one row of data at a time.

Upvotes: 1

Related Questions