similar to: Change the datatype of an attribute?

Displaying 20 results from an estimated 4000 matches similar to: "Change the datatype of an attribute?"

2006 Jul 08
1
Need Help Understanding Situation with Table Columns
I am trying to create an application loosely based on the Depot application presented in Agile Web Development with Rails (AWDwR). I am using InstantRails for the server. In my app I have the folowing controllers: admin_controller application_controller city_map_controller (with method: displayGMap) The admin_controller was created with the following command: ruby script/generate scaffold
2007 Aug 24
0
ArgumentError: interning empty string and enum-column plugin
Hello, I am a developer who has just started working on a large scale website in a team of 5 other developers. One of the developers has introduced some enum columns into the the database. Now, by default, active record doesn''t support enum column types but I have added the enum-column plugin into our project. This has worked very well except for a few instances where he
2006 Jul 21
2
Tableless ActiveRecord attribute and my aching head
I beat my head against a wall for almost 2 hours with this issue. My first problem was easily solved. I wanted a class that could use ActiveRecord''s validation capabilities but without using a table behind it (I would be persisting setup information in the session, but the initial setup parameters come from a user input form) No problem...found this link which got me up and running
2008 Dec 05
1
ActiveRecord Oracle and nvarchar2 or nclob datatype
Hi, I ve got oracle database which exists prior to my rails app... :-( I ve got trouble when I am updating/inserting records of a table which includes nvarchar2 attributes. These have a specific maximum length. I often get an error Value too long for column when doing my inserts/ updates, but in fact that is not the case. I ve taken a look at the generated sql statements.... As far as I know
2008 Feb 26
5
Rails 2.0.2 MySQL 'year' datatype missing from ActiveRecord?
Hi all, This is my first post to the forum, and I''ll point out right away that I''m a noob to everything, Ruby, Rails, MySQL, etc., so I expect that I''m wrong here, but is the ''year'' datatype missing from ActiveRecord in 2.0.2? According to my MySQL 5.0 reference manual, ''year'' is a datatype, but when I try to run a migration that has
2006 Aug 16
3
Validate your forms with a table-less model
Ive followed this example of how to validate a form with a tableless model: http://rails.techno-weenie.net/tip/2005/11/19/validate_your_forms_with_a_table_less_model Ive got this example working but when validation fails the failed boxes are not highlighted in red. At the moment i have a contact details form and want to validate the information entered by the user but this will just result
2007 Mar 17
4
Created_on and updated_on in a non-ActiveRecord model
Hi you all, I have a model simulating an ActiveRecord model, according to the tips stated in [1]. It is simulated because even though I am gonna save the attributes in a file, not in a DB, I still want the validations made by ActiveRecord::Base (see code below). Well, the thing is that I also want the behaviour of the created_on and updated_on columns, that get modified automatically before
2006 Sep 27
0
MySQL and Default values
I got my first taste today of dealing with the default values in MySQL. It seems that Rails loads the default values for fields based on the database (seems reasonable, specify in one place and let if flow through). The problem is that if I say NOT NULL and do not specify a default value, MySQL inserts a default value anyway. See http://dev.mysql.com/doc/refman/5.0/en/data-type-defaults.html
2006 Feb 05
0
Enum patch for Rails
Hello! I''ve modified ActiveRecord a bit to support enum columns. This is tested only with MySQL, and maybe needs some changes for other adapters (if they use another syntax or quoting style). I believe this patch should be tested well, so I haven''t (yet) tried to post it to the official Trac. It is also not solid-as-a-rock when it comes to quoting ENUM values. After
2012 Dec 12
2
[LLVMdev] donot support uint datatype?
hi guys, i use clang to compile a program with datatype uint, but i get errors saying " use of undeclared identifier 'uint'; did you mean 'int'? ". it really doesn't support it? if true, how can i add a datatype? -- View this message in context: http://llvm.1065342.n5.nabble.com/donot-support-uint-datatype-tp52523.html Sent from the LLVM - Dev mailing list archive
2012 Dec 12
0
[LLVMdev] donot support uint datatype?
Hi Chen, On Tue, Dec 11, 2012 at 04:37:20PM -0800, Dong Chen wrote: > hi guys, > i use clang to compile a program with datatype uint, but i get errors saying > " use of undeclared identifier 'uint'; did you mean 'int'? ". > > it really doesn't support it? if true, how can i add a datatype? clang related question should go to cfe-dev at cs.uiuc.edu
2017 Nov 02
0
Memory address of character datatype
If you were curious about the hidden details of the memory layout in R, the best reference is the source code. In your example, you are not getting to your string because there is one more pointer in the way, "x" is a vector of strings, each string is represented by a pointer. At C level, there is an API for getting an address of the value, e.g. INTEGER(x) or CHAR(STRING_ELT(x)). At
2006 May 22
3
Using the MySQL SET datatype
Does anyone have any links to example code showing how to use the MySQL SET datatype in my ActiveRecord objects. -- Posted via http://www.ruby-forum.com/.
2017 Nov 01
2
Memory address of character datatype
Hi, ? To get the memory address of where the value of variable "x" (of datatype "numeric") is stored one does the following in R (in 32 bit): ? ??? ? library(pryr) ? ?? ?x <- 1024 ?? ?? addr <- as.numeric(address(x)) +?24?? ?# 24 is needed to jump the variable info and point to the data itself (i.e. 1024) ? The question now is what is the value of the jump?so that one
2006 Aug 15
1
Interval datatype in migrations
How can I use an interval datatype inside migrations ? execute ? TIA, ngw -- Nicholas Wieland nicholas_wieland@yahoo.it -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060815/1c262694/attachment.html
2012 Dec 12
2
[LLVMdev] donot support uint datatype?
hi Wei-Ren, i got it, i have to add a "typedef int uint;" that's not a big problem thank you -- View this message in context: http://llvm.1065342.n5.nabble.com/donot-support-uint-datatype-tp52523p52528.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
2017 May 22
2
How exactly is datatype alignment determined?
Hi, I'm seeing a bug in the AVR backend that seems to be caused by LLVM thinking things will be aligned to 8 bytes whereas they are unaligned. Specifically, MF->getDataLayout().getPrefTypeAlignment(Ty) returns 8 for the following two types: %opt = type { i8, [0 x i8], [3 x i8] } %Machine = type { i16, [0 x i8], i16, [0 x i8], [16 x i8], [0 x i8] } The target datalayout specifies that
2006 Mar 21
0
INTERVAL datatype
Really simple question: how do I use an INTERVAL datatype with migrations ? I need it to represent a song duration. TIA, -- Nicholas Wieland nicholas_wieland@yahoo.it ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it
2009 Jun 10
1
gpc.poly datatype
I have a list of polygons generated by the contourLines() command (each object of the list is a list in itself with two objects: a vector of x values, and a vector of y values for each vertex). I wish to convert that list into a gpc.poly object of multiple contours. How do I do this? gpclib apparently has no method of coercing lists into the gpc.poly object type. As well, when I have a
2008 Jul 04
1
datatype problem when using ActiveRecord with Oracle
Hey, I have connected to the oracle db using ActiveRecord and am trying to retrieve tuples. I have one attribute that has datatype ''number(1)''. I found that ActiveRecord maps this attribute to boolean. So it gets a class of either FalseClass or TrueClass. I tried to find the source of the problem and I found oracle_adapter.rb (http://