similar to: Boolean quoting, postgresql

Displaying 20 results from an estimated 2000 matches similar to: "Boolean quoting, postgresql"

2006 Apr 04
9
Does ActiveRecord have support for "Boolean" columns?
Hey all -- I''ve been using enumerable char(1)''s with ''y'' and ''n'' values for my Boolean columns in Rails, but it strikes me there should be a better way. How do you setup columns that represent true/false-ness in your schemas on Rails? Wondering what kind of standard approaches there are other than me writing something like class MyEntity
2008 Aug 28
2
1 or true in TINYINT(1) column?
Hello, there is a table that has a column TINYINT(1) called status. Through mysql console I see its value as 1 (when is true) but if I do this in Rails console: Mytable.status => true give me "true" rather "1". How could I change 1 to true using some method? Or true to 1? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2010 Jan 09
3
tinyint(1) and boolean
So i had a boolean attribute in my model which gets interpreted to tinyint(1) in mysql by rails migrations. Now tinyint(1) accepts a range in mysql and i want to change my boolean attribute to an attribute which can accept 3 values(0,1,2). I made the change to the view and when i post the form selecting the selecting the value ''2'', it still gets saved as a ''0''.
2007 Feb 07
2
Problems Generating Scaffolding
I am having trouble generating some of my scaffolding. I''m trying to use PostgreSQL as my back-end. Some of my scaffolding generates with no problem but for other parts I get this: Before updating scaffolding from new DB schema, try creating a table for your model The tables do exist. At least I can see them from psql. Here is the SQL I''m using to create my tables: CREATE
2004 May 10
3
sqlSave with underscores in table fieldname
Hi group, I try to write a frame to a table (RODBC). I use colnames(temp6) <- c("ind_id","ser_id","period_id","year","calc","mean") sqlSave(channel, temp6, tablename = "series_indices_test",append= TRUE, rownames=FALSE, verbose = FALSE, test = FALSE, nastring = -999999, fast = FALSE) This is giving me an error: Error in
2004 Apr 19
3
encoding from 22050Hz source
Hi! I'd like to encode from a 22050 Hz source wav file (only in that case), but i get the following error message: "Invalid floating point operation" I use delphi: vorbis_encode_init_vbr(vi,2,22050,0.5) . . . While (i < readCount div 4) Do Begin buffer[0][i] := smallInt((pArray(@readbuffer)[i shl 2 + 1] shl 8) or pArray(@readbuffer)[i shl 2 + 0]) / 32768;
2007 Mar 05
1
ODBC Adapter woes
Hi All, I am running into a little issue the ODBC adapter: rails: 1.2 ruby: 1.8.4 ODBC ruby binding: .0997 Rails ODBC adapter: 1.4 I have added the ruby bindings to the /ruby/1.8/i386-msvcrt and used gem to install the ODBC adapter I updated the enviroment.rb when I run ruby -e ''require "odbc"'' it appears to correct (no error response) 1. Is my understanding
2006 Jun 01
2
Hiding an attribute
I am using a smallint database column to store several boolean flags. The flags are accessible thru facade column accessors. I''d like to hide the database column so all access is thru the facade accessors. How do I do it? TIA, Jeffrey
2006 Jul 06
3
Understanding date_select naming conventions
I am using the date_select helper to generate date select elements in a form. I notice that the generated HTML shows that these selects have the following names: Month: current_job[StartDate(2i)] Day: current_job[StartDate(3i)] Year: current_job[StartDate(1i)] I''m assuming that the Xi identifiers somehow specify the appropriate date part from a date or time value. Can anyone
2004 Feb 13
10
Encoding into MONO (delphi)
Hi! I have a problem. I hope, you can help me. I use a Delphi conversion (from Aleksandr Shamray), but it doesn't work when I'd like to convert a *.RAW into a mono *.ogg file. vorbis_encode_init_vbr(vi, 1, 44100, 0.5); //because of the mono the program stops at line: //* uninterleave samples */ . . buffer[1][i] := smallInt((pArray(@readbuffer)[i shl 2 + 3] shl 8) or
2006 Jan 05
8
Repost - Do dynamic finders work with legacy schemas?
Hello everyone, I have another question related to a legacy schema I am working with. Do dynamic finders work with legacy schemas in general? The schema I am working with uses hungarian prefixes for column names. For example fOpen is 0 if a bug is closed and 1 if it is open (type smallint). When I try @bugs = Bug.find_all_by_fOpen(1), I get the following exception: undefined method
2006 Aug 05
10
Converting mysql to postgres
Hi, Anyone got any cool tricks for converting a Rails site (in this case, a typo installation) from a mysql database to a postgresql database? I''ve got it almost working -- I''m doing a SQL dump from mysql and loading it into postgres. However, mysql does booleans as a tinyint with 0 = false and 1 = true. When I try to import that into a postgres database that expects booleans
2005 Mar 04
3
Boolean values
Hi, I''m using SQL Server. I have a BIT field. I have a fix and a question. This is a patch for a bug in the SQL Server adapter that causes any insert or update to fail: lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -239,2 +239,2 @@ - when TrueClass then (column && column.type == :boolean ? "''t''" : "1")
2006 Jun 08
2
Errata in the "Four Days with Rails"
Hi, I spent more than 4 days getting done with the "Four Days with Rails" tutorial, mostly because I ran into a few issues that seemed to stop me in my tracks.  But, after looking around, I was able to find the problems and solve them (in whatever way I thought best) :-) I''m posting the whole list of problems that I ran into with "Four Days with Rails" to the list so
2006 Aug 19
7
Impossible to get stable?
I have concluded that it is impossible to get this background process stable. I am out of ideas and could really use some help. Here is what I have: 50 workers, just running an infinite loop that constantly calls save! on a model. Keep in mind this is just for testing purposes. I catch all exceptions and put them in the log. I am tried setting allow_concurrency to true and false. Neither
2007 Aug 03
2
my number column returns boolean values
Hi everyone, I''m working on a new rails project and have to build it on top of a legacy oracle database. I''m trying to figure out how to get the number value from a NUMBER(1) datatype. So far I''m only getting a "true" value for 1 and "false" for any other number. From the console I can print out my object values and can see that there are number
2005 Jun 29
3
Setting the value of a primary key field
I have a table that is to hold all ISO 639 language codes: alpha3t, alpha3b, alpha2, that bunch. It also (indirectly) holds language names, but that''s off-topic. alpha3t is the primary key, so I''ve told Active Record about this by saying set_primary_key "alpha3t" within the Language model. (Don''t try to call your models things like ISO639 (won''t work
2012 Jul 25
0
help about quota config
hi all : mysql mailbox below : CREATE TABLE `mailbox` ( `username` varchar(255) NOT NULL DEFAULT '', `uid` varchar(255) NOT NULL DEFAULT '', `password` varchar(255) NOT NULL DEFAULT '', `clearpwd` varchar(128) NOT NULL DEFAULT '', `name` varchar(255) NOT NULL DEFAULT '', `mailhost` varchar(255) NOT NULL DEFAULT '', `maildir`
2007 Jun 27
5
Filter Ordering in Edge Rails (Rev 7143)
Filter chaining appears to behave in differently than Rails 1.2.x. It seems that I''m getting a lot of errors along the lines of: ActionController::ActionControllerError: filter #<ActionController::Filters::ClassMethods::BeforeFilterProxy:0x322f468 @filter=#<ActionController::Filters::ClassMethods::SymbolFilter: 0x322f4b8 @filter=:login_required>> was in the wrong place!
2008 Jan 21
8
Polymorphic URL helpers documentation and fixes
Yesterday I answered a question regarding polymorphic URL helpers on Core ML and noticed that the module has no documentation. I''ve documented it and rewritten unit tests using Mocha. I also optimized some of the code slightly (nothing major, though). The patch also includes two fixes by Geoff Buesing, who has done awesome work in this area in the past.