Method: Bdb::Db#get_type
- Defined in:
- ext/bdb.c
#get_type ⇒ Object
db.get_type -> Fixnum(type)
an integer indicating the type of db (BTREE, HASH, etc).
923 924 925 926 927 928 929 930 931 932 933 934 935 936 |
# File 'ext/bdb.c', line 923 VALUE db_get_type(VALUE obj) { t_dbh *dbh; int rv; DBTYPE dbtype; Data_Get_Struct(obj,t_dbh,dbh); if (!dbh->db) raise(0, "db is closed"); rv=dbh->db->get_type(dbh->db,&dbtype); if (rv) raise_error(rv,"db_get_type failed: %s",db_strerror(rv)); return INT2FIX(dbtype); } |