Beispiel #1
0
// Count returns the number of records in the database.
func (d *DB) Count() (int, error) {
	var err error
	v := int(C.kcdbcount(d.db))
	if v == -1 {
		err = d.LastError()
	}
	return v, err
}
Beispiel #2
0
func (kc *KCDB) Count() (count uint64, err error) {
	ccount := C.kcdbcount(kc.db)
	if ccount == -1 {
		err = kc.error()
	} else {
		count = uint64(ccount)
	}
	return
}
Beispiel #3
0
func (self *KcDb) Count() int64 {
	return int64(C.kcdbcount(self.cdb))
}