search for: dbobj

Displaying 5 results from an estimated 5 matches for "dbobj".

Did you mean: db_obj
2007 Apr 20
2
Caching of database values
If do something like this: dbObj = MyTable.find_by_id(5) a = dbObj.name b = dbObj.name How many times will an SQL call be made to get the value of MyTable.name for id 5? In other words, are the values for dbObj cached in the object? Is there a way of controlling that? (I can imagine that sometimes you might not want to...
2001 Mar 19
3
generic database access methods
...cess. The packages is called "Rdbi." It borrows as much as possible from existing database packages / proposals. I'd like to start a discussion about the proposed interface. Here's what I've come up with so far: # # Rdbi: connectionMethods.R # dbConnect <- function(dbObj, ...) UseMethod("dbConnect") # # dbObj should be generated by an implementation defined function, # e.g., RPgSQL(), which returns a object with an approprite class # name, e.g., "PostgreSQL" or "MySQL". The implementation then # provides a method that actually opens t...
2002 Dec 18
1
A little problem handling logicals in RMySQL under R1.6.1
...1816,0)> # here is the data frame > print(a<-data.frame(x=c(TRUE,FALSE),y=c(FALSE,TRUE))) x y 1 TRUE FALSE 2 FALSE TRUE # as promised, the two data frame columns are identified as logicals and # the field types are set to tinyint > field.types <- sapply(a, dbDataType, dbObj = con) > field.types x y "tinyint" "tinyint" # However, in WriteTable, nothing is done to convert the logicals to 0s and 1s. # And logically, the infile is written in TRUE and FALSE and finally, in MySQL # all becomes zero. Here is what we get in MySQL:...
2009 Dec 30
1
seg-fault... but on what
...files in a directory and inserts line by line into a database... *** caught segfault *** address 0xc0000010, cause 'memory not mapped' Traceback: 1: .getGeneric(f, where, package) 2: getGeneric("coerce", where = where) 3: as(obj, "integer") 4: mysqlConnectionInfo(dbObj, ...) 5: dbGetInfo(conn, "rsId") 6: dbGetInfo(conn, "rsId") 7: dbListResults(con) 8: dbListResults(con) 9: mysqlQuickSQL(conn, statement, ...) 10: dbGetQuery(con, sql) 11: dbGetQuery(con, sql) 12: doTryCatch(return(expr), name, parentenv, handler) 13: tryCatchOne(expr, name...
2005 Oct 27
2
RSQLite problems
Hi, I'm experimenting with using (R)SQLite to do data management. Here are two little problems that I've encountered: 1. The presence of ',' in string values causes trouble since ',' is also the delimiter used in the SQL statement. 2. A newline '\n' line attached to the last string value of each row. Some examples: > library (RSQLite) Loading required