Because of these various issues and the work required to ensure stable results, we recommend
that, where possible, you stay away from accessing stored procedures in your Active Record
applications. Still, the previous two examples should at least show that it is possible when you
absolutely must deal with a stored procedure within your Active Record code.
Data Types
Now that we??™ve covered all the configuration options, the tips and tricks for CRUD operations,
and how to deal with various database-specific features like stored procedures, we have just
one more important area worth addressing when dealing with legacy systems??”data types,
specifically, unique data types and how Active Record handles each.
Ruby itself has only a handful of data types, and for the most part, they can be reasonably
mapped to standard database types. For example, String can be mapped to varchar or char
types. Integer can be mapped to integer. Float can be mapped to fixnum or float types.
But like most things, there are a few exceptions.
Pages:
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412