Android specifies the super-handy _id
column in the BaseColumns
interface, usage of which is very well explained in this question, but what is _count
for? Count of rows in a directory, what directory?
public interface BaseColumns
{
/**
* The unique ID for a row.
* <P>Type: INTEGER (long)</P>
*/
public static final String _ID = "_id";
/**
* The count of rows in a directory.
* <P>Type: INTEGER</P>
*/
public static final String _COUNT = "_count";
}
The column-count CSS property breaks an element's content into the specified number of columns.
Use the COUNT function to get the number of entries in a number field that is in a range or array of numbers. For example, you can enter the following formula to count the numbers in the range A1:A20: =COUNT(A1:A20). In this example, if five of the cells in the range contain numbers, the result is 5.
As said in this tutorial:
Every provider can also report the number of records returned as the _COUNT column; its value is the same for all rows.
Here is an example result set for the query in the previous section:
_ID _COUNT NAME NUMBER
44 3 Alan Vain 212 555 1234
13 3 Bully Pulpit 425 555 6677
53 3 Rex Cars 201 555 4433
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With