similar to: Uniqueness and sql serialize

Displaying 20 results from an estimated 1000 matches similar to: "Uniqueness and sql serialize"

2012 Mar 22
6
rescuing ActiveRecord::RecordNotUnique: clever or ugly?
I have an ActiveRecord that has several foreign keys, where the foreign keys act as a single compound key that needs to be unique: class CreateRelations < ActiveRecord::Migration def change create_table :relations do |t| t.references :src, :null => false t.references :dst, :null => false end add_index :relations, [:src_id, :dst_id], :unique => true end end
2006 May 19
7
AR transactions and isolation levels
I''m trying to create a sequence with no gaps in my db (contrived example, but should work out the same as my real one), and believe db-managed transactions are the way to go about this. It''s my first real ''go'' at transactions, so I may be mistaken about how things really work. Anyway.. Consider this example code: Class Invoice < ActiveRecord::Base def
2006 May 08
5
The true merit of non-memory based session stores
All, There is an assertion in AWDWR that the in-memory session store is "too simplistic." However, I find myself nudged in this direction by the need to keep a non-serializable model attribute available in my session and the relative pain of implementing either a custom serialization scheme for the model in question (or a custom caching mechanism so that I can store my attribute
2013 Nov 27
3
[PATCH v3 RFC 3/4] virtio_blk: avoid calling blk_cleanup_queue() on device loss
On Wed, Nov 27, 2013 at 11:32:39AM +0100, Heinz Graalfs wrote: > Code is added to avoid calling blk_cleanup_queue() when the surprize_removal > flag is set due to a disappeared device. It avoid hangs due to incomplete > requests (e.g. in-flight requests). Such requests must be considered as lost. Ugh. Can't we complete these immediately using detach_unused_buf? If not why? > If
2013 Nov 27
3
[PATCH v3 RFC 3/4] virtio_blk: avoid calling blk_cleanup_queue() on device loss
On Wed, Nov 27, 2013 at 11:32:39AM +0100, Heinz Graalfs wrote: > Code is added to avoid calling blk_cleanup_queue() when the surprize_removal > flag is set due to a disappeared device. It avoid hangs due to incomplete > requests (e.g. in-flight requests). Such requests must be considered as lost. Ugh. Can't we complete these immediately using detach_unused_buf? If not why? > If
2015 Apr 23
3
Usar una matriz sparse desde python a R
Hola erreros Estoy rizando el rizo con esto de las matrices sparse y he encontrado la forma de hacerlo en python, que va rapidísimo. Por tanto tengo una matriz sparse en un objeto python con esta info: <138493x26744 sparse matrix of type '<type 'numpy.int64'> Quiero hacer lo mismo con R pero me he topado con la lentitud de los bucles para rellenar la sparse (también por mi
2013 Nov 27
2
[PATCH v3 RFC 3/4] virtio_blk: avoid calling blk_cleanup_queue() on device loss
On Wed, Nov 27, 2013 at 12:37:02PM +0100, Heinz Graalfs wrote: > On 27/11/13 11:47, Michael S. Tsirkin wrote: > >On Wed, Nov 27, 2013 at 11:32:39AM +0100, Heinz Graalfs wrote: > >>Code is added to avoid calling blk_cleanup_queue() when the surprize_removal > >>flag is set due to a disappeared device. It avoid hangs due to incomplete > >>requests (e.g. in-flight
2013 Nov 27
2
[PATCH v3 RFC 3/4] virtio_blk: avoid calling blk_cleanup_queue() on device loss
On Wed, Nov 27, 2013 at 12:37:02PM +0100, Heinz Graalfs wrote: > On 27/11/13 11:47, Michael S. Tsirkin wrote: > >On Wed, Nov 27, 2013 at 11:32:39AM +0100, Heinz Graalfs wrote: > >>Code is added to avoid calling blk_cleanup_queue() when the surprize_removal > >>flag is set due to a disappeared device. It avoid hangs due to incomplete > >>requests (e.g. in-flight
2006 Jun 18
1
Put an arbitary hash into ActiveRecord
Did someone encountered a problem of putting a hash of values into AR, into a certain field? Essentially I need some denormalized, freeform serializable hash to which the user can add keys and values, and handle accessors from there would be lovely too. I remember that AR has "serialize" but did someone actually use it? I heard nothing but complaints about rich objects in AR
2006 Apr 12
1
How best to handle non-serializable session data?
I have a piece of data that needs to persist across requests that is not serializable. It''s a Rubyful soup parse tree and it''s very expensive to instantiate and I need it for a while in my app. Therefore, by default, it can''t be stored in the session since the default session storage mechanism is pstore. One option I have to is change the session storage mechanism
2019 Sep 26
2
[RFC] Propeller: A frame work for Post Link Optimizations
On Thu, Sep 26, 2019 at 12:39 PM Eli Friedman <efriedma at quicinc.com> wrote: > > > > From: Xinliang David Li <xinliangli at gmail.com> > Sent: Wednesday, September 25, 2019 5:58 PM > To: Eli Friedman <efriedma at quicinc.com> > Cc: Sriraman Tallam <tmsriram at google.com>; llvm-dev <llvm-dev at lists.llvm.org> > Subject: [EXT] Re: [llvm-dev]
2005 Apr 21
3
Objects in R
Hi, A few comments from a fairly experienced R user who worked for several years on a R-based bioinformatics analysis framework. I don't want to misrepresent anyone's views, but... There are real disadvantages to the "objects-as-C-structs" and functions/methods which "mutate" based on argument type. i.e. S4. (1)Novices simply don't understand it.
2005 Oct 21
4
Validate uniqueness on two columns
I would like to validate the uniqueness of two columns together. I have last and first names as separate columns. What is the Rails Way to do this? Thanks, Jared Nuzzolillo _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
2019 Sep 27
5
[RFC] Propeller: A frame work for Post Link Optimizations
On Thu, Sep 26, 2019 at 5:13 PM Eli Friedman <efriedma at quicinc.com> wrote: > > > -----Original Message----- > > From: Sriraman Tallam <tmsriram at google.com> > > Sent: Thursday, September 26, 2019 3:24 PM > > To: Eli Friedman <efriedma at quicinc.com> > > Cc: Xinliang David Li <xinliangli at gmail.com>; llvm-dev <llvm-dev at
2006 Feb 17
2
validate uniqueness of two fields
I have Proposals and Members and Members can vote for a proposal only once. So, I have "Vote belongs_to :member, :proposal", but to make sure a member only votes once, I want to make sure that there isn''t a vote in the db with that member_id and proposal_id. I can just put the appropriate find in a vote.valid? but I wanted to make sure I wasn''t missing a nice rails
2007 Sep 02
2
problem validating uniqueness
I have validates_uniqueness_of :name in my model which works fine when creating a record but doesn''t work when I edit the record. In other words it won''t let me create a record with the same name but I can go in after and update the field without a problem. Why would this happen? -Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2012 May 21
1
Active Admin help
I have installed active admin and also add my model -controller rate_professor there.......I can add/delete/edit data using active admin ...but if I click on submit button of my form in rate_professor controller ... I can see whatever I added in the index page ........but I don''t want to see that one.....I want to find the information(whatever I added by clicking submit button) on
2013 Nov 27
7
[PATCH v3 RFC 0/4] virtio: add 'surprize_removal' to virtio_device
Hi, here is an updated patch-set to my v2 RFC virtio: add new notify() callback to virtio_driver This RFC introduces a new virtio_device entry 'surprize_removal' instead of a new 'notify' callback in struct virtio_driver. When an active virtio block device is hot-unplugged from a KVM guest, affected guest user applications are not aware of any errors that occur due to the lost
2013 Nov 27
7
[PATCH v3 RFC 0/4] virtio: add 'surprize_removal' to virtio_device
Hi, here is an updated patch-set to my v2 RFC virtio: add new notify() callback to virtio_driver This RFC introduces a new virtio_device entry 'surprize_removal' instead of a new 'notify' callback in struct virtio_driver. When an active virtio block device is hot-unplugged from a KVM guest, affected guest user applications are not aware of any errors that occur due to the lost
2007 May 15
4
Need help with singleton worker
We have a fairly expensive task that we''d rather not schedule too many instances of in parallel. Couldn''t get pool_size to limit the amount of workers, and I figure that''s hardly optimal anyway, so would like to have the work queued up for a single named worker instead, running as soon as possible. Using MiddleMan.schedule_worker() with :job_key does start off a