search for: statement

Displaying 20 results from an estimated 4404 matches for "statement".

2006 Mar 23
8
ActiveRecord & Prepared Statement
I searched the archives and found a thread about it, but I didn''t understand: are prepared statement used by ActiveRecord on those databases that could handle them (Postgresql, Mysql, Oracle etc)? In case they are not used, are they planned? Is there a roadmap about Rails I can find somewhere?
2010 Jun 10
4
gem update fails on make sqlite3
...47;backward -I/usr/local/include/ruby-1.9.1 -I. - DHAVE_RB_PROC_ARITY -I/usr/local/include -I/opt/local/include -I/usr/ include -fPIC -O2 -g -Wall -Wno-parentheses -O3 -Wall -Wcast-qual - Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -o statement.o -c statement.c statement.c: In function âinitializeâ: statement.c:53: warning: implicit declaration of function âsqlite3_prepare_v2â statement.c:64: warning: passing argument 2 of ârb_str_newâ as signed due to prototype statement.c: In function âbind_paramâ: statement.c:269: error: âsqlite3_int64...
2005 Oct 14
10
Active Record: Prepared Statements?
Hello all, my first project is on it''s way, and I am loving it! But, and that''s a big BUT: Active Record does not use prepared statements! How is that? Everybody is bragging about performance and the most obvious tuning measure is missing. Ok, I don''t know, if MySQL can even do them as I am using Postgres, but still. I started looking at the code and it is not prepared for prepared statements at all (pun not intended), som...
2011 Sep 13
4
Prepared statements and postgreSQL schemas
Hi guys. I''m using a postgreSQL with multiple schemas. To change between schemas I use the ''SET schema TO ...'' statement. That works ok in rails 3.0. Rails 3.1 uses prepared statements and does not take into account the ''schema_search_path''. This is a big problem because the statement is prepared once and then the same prepared statement is executed many times no matter if you changed the schema, i...
2012 Sep 11
3
question about how to set up an active record adapter to prefer use of prepared statements...
Hi, I am writing an active record adapter for our new database and when I run the tests I see lots of statements that could be run as prepared statements, but instead of passing me bindings AR passes me a fully specialized SQL string, not in all cases, but in many. Here is an example: SELECT addrs.* FROM addrs WHERE addrs.user_id = 153 FETCH FIRST 1 ROWS ONLY I do have this hook set up: def supports_s...
2009 Mar 28
0
R: Fortran 90 etc.
...an implementation into R ... which is what I hoped I could avoid. Maura host705:Desktop mauede$ R CMD SHLIB ford.f90 gfortran -arch i386 -fno-common -g -O2 -c ford.f90 -o ford.o ford.f90:2: c ----------------------------------------------------------------------------- 1 Error: Unclassifiable statement at (1) ford.f90:3: c --- Choozing wavelet order from minimum enthropy of squared wavelet 1 Error: Unclassifiable statement at (1) ford.f90:4: c --- coefficients distribution on detail levels with numbers from LevMin up to 1 Error: Unclassifiable statement at (1) ford.f90:5: c --- Vocabulary of w...
2005 Dec 28
6
Sudden Javascript Console noise in firefox
I have been using the latest version of Firefox and Scriptaculous for about a week now, with no problems. Now I get a lot of noise in the javascript console out of the blue: http://img481.imageshack.us/img481/7913/screen4nt.jpg -- ============================ Brian Peiris Brampton, Ontario, Canada brianpeiris-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org or
2011 Jan 26
1
Wine 1.3.12 build failed on OpenIndiana b148
...#47;bin/gcc compiler and gnu ld. For configure script I change only prefix. when i make gmake i get error. ........... gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_KERNEL32_ -D_NORMALIZE_ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wwrite-strings -Wpointer-arith -I/usr/sfw/include -I/usr/X11/include -I/usr/include -g -I/usr/sfw/include -I/usr/X11/include -I/usr/include -g -o actctx.o actctx.c gcc -c -I. -I. -I../../include -I../....
1997 Aug 13
1
R-beta: compiling R-5.0 on IRIX6.1
...y SGI Indigo 2 R8000 machine with IRIX6.1 and it stopped in the middle. Could anyone help me to fix it? Many thanks! p.s.: The last lines of message: : ../lib/libappl.a cd regex; make cc -g -I../include -DPOSIX_MISTAKE -c regcomp.c "regcomp.c", line 753: warning(1110): statement is unreachable break; ^ cc -g -I../include -DPOSIX_MISTAKE -c regerror.c cc -g -I../include -DPOSIX_MISTAKE -c regexec.c "engine.c", line 604: warning(1110): statement is unreachable break; ^ "engine.c", line 610: warning(1110): statement is unreachab...
1997 Aug 13
1
R-beta: compiling R-5.0 on IRIX6.1
...y SGI Indigo 2 R8000 machine with IRIX6.1 and it stopped in the middle. Could anyone help me to fix it? Many thanks! p.s.: The last lines of message: : ../lib/libappl.a cd regex; make cc -g -I../include -DPOSIX_MISTAKE -c regcomp.c "regcomp.c", line 753: warning(1110): statement is unreachable break; ^ cc -g -I../include -DPOSIX_MISTAKE -c regerror.c cc -g -I../include -DPOSIX_MISTAKE -c regexec.c "engine.c", line 604: warning(1110): statement is unreachable break; ^ "engine.c", line 610: warning(1110): statement is unreachab...
2008 Jan 16
4
How to test if one range of dates overlaps another?
Hi all, I have a situation with a recurring billing application where I need to test if one range of dates "overlaps" another range of dates. Does anyone know a rails find or mysql select statement that will test for this? Here are the details: * Recurringcharge items have a start_date and an end_date that represent the period of time that the charges should occur. * Statement items have begin_on and end_on properties that represent the period of time that is being billed for. In order to...
2008 Aug 13
4
conditional IF with AND
Hi everyone, I''m trying to create an "if" conditional statement with two conditions, whereby the statement is true when condition 1 AND condition 2 are met: code structure: if ?AND? (a[x,y] <condition1>, a[x,y] <condition2>) I''ve trawled through the help files, but I cannot find an example of the syntax for incorporating an AND in a condi...
2006 Jul 03
5
How do I code this conditional statement in Ruby
Hi, I am a COBOL programmer and I am busy teaching myself Rails and Ruby. In COBOL I can code this conditional If x = 1 next sentence else .......................... The "next sentence" statement enables me to get out of the conditional. How would I code the same thing in Ruby? In C you could use break but I understand that Ruby has no break statement. Regards, Paul
1997 Jun 10
0
R-beta: Compiling 0.49 on IRIX6.1
...on my SGI Indigo 2 R8000 machine and it stopped in the middle. Could anyone help me to fix it? Many thanks! p.s.: The last lines of message: cc -g -I../include -DPOSIX_MISTAKE -c regerror.c cc -g -I../include -DPOSIX_MISTAKE -c regexec.c "engine.c", line 604: warning(1110): statement is unreachable break; ^ "engine.c", line 610: warning(1110): statement is unreachable break; ^ "engine.c", line 616: warning(1110): statement is unreachable break; ^ "engine.c", line 627: warning(1110): statement is unreachable break;...
2006 Jun 15
3
Can I call MySql statements directly??
Hi All. I have a mysql statement that I would really really like to call from my Ruby program which goes like this: SELECT a, b, DAYOFWEEK(date_time) as DOW, HOUR(date_time) at hr, AVG(x/y) FROM records; This is possible by creating a 3-dimentional array of a, b, date_time containing x/y, and then...
2006 Oct 25
2
Coding style query (braces)
Re: placement of braces and "else" clauses. At the R prompt, I believe their placement must avoid causing a syntactically complete statement at the wrong place. This can results in what might be considered rather awkward looking code. IF it is known that code will be used via sourcing a script only, is there any potential problem with placing braces as shown below ? xxx <- function() { blah() if (x > 3) { ... if statemen...
2006 May 31
7
Rails, Transactions, and statements
Hi, I have a problem where I need an auto-incremented id back from the database for a statement that has yet to be committed. The operation that uses the id may fail, and if so, I need to rollback the database. I can''t figure out how to send only the statement to the database without the commit without sending over hard coded SQL. This is what I started out with: 1 def add_a...
2006 Apr 22
1
Rails db adapter problem - "-- statement #0"
Hi all, I''m working on a database adapter for the Ingres database and I''m having a problem with the Rails tests. The first SQL statement from each of the four SQL files (ingres.sql, etc), is sent to the database with this line first: -- statement #0 and extra blank lines. So the database is getting "sql" that looks like this: " -- statement #0 DROP TABLE courses " instead of DROP TABLE courses I''...
2006 Jan 11
2
How to execute an SQL statement in rails?
Hello, This is probably a silly question but looking at "api.rubyonrails.org", I can''t seem to figure out which method I should be using ... I want to execute an sql statement, like "truncate table BLAH" from within one of my rails app ... What''s the "right" way to do this? Thanks, /B -- Bruno Mattarollo <bruno.mattarollo@gmail.com> Currently in: Sydney, Australia
2006 Aug 04
3
Migration::alter statements ??
Hi, Where to put the execute statements in migration scripts? e.g, I would like to create a table and add a foreign_key reference. def self.up ?? execute "alter table ...." create_table :my_table do |t| t.column :user, :string end ?? execute "alter table ...." end Should the execute statement be above...