search for: has_s

Displaying 20 results from an estimated 46 matches for "has_s".

2016 Jan 27
4
[PATCH] lvm: support lvm2 older than 2.02.107
...(&ret) == -1) + return NULL; + + return ret.argv; +} + char ** do_pvs (void) { @@ -139,26 +219,76 @@ do_vgs (void) return convert_lvm_output (out, NULL); } +/* Check whether lvs has -S to filter its output. + * It is available only in lvm2 >= 2.02.107. + */ +static int +test_lvs_has_S_opt (void) +{ + static int result = -1; + if (result != -1) + return result; + + CLEANUP_FREE char *out = NULL; + CLEANUP_FREE char *err = NULL; + + int r = command (&out, &err, str_lvm, "lvs", "--help", NULL); + if (r == -1) { + reply_with_error ("lvm l...
2006 May 23
0
does has_many: add a has_<associated_class>? method
Hi, I have a Country class which has_many: regions. At the same time, the corresponding countries table has a boolean column named has_regions. It happens that when I try to access that attribute using country_instance.has_regions? , I can see in the logs that Rails is querying the database with a SELECT that''s counting the regions in that country. Obviously, that''s
2006 May 26
4
What association do I want here, has_ or belongs_to?
I thought I had a handle on this one but it''s causing me grief and I''m hoping somebody can set me straight. I have an object AlertTemplate which will contain a fill in the blank style hunk of web content. I then have an object, Alert, which will have a relationship to one of those AlertTemplate objects, plus some data. So, in human speak, I''d think that an Alert
2017 Jul 14
0
[PATCH 14/27] daemon: Reimplement ‘lvs’ API in OCaml.
...- return NULL; - - return take_stringsbuf (&ret); -} - char ** do_pvs (void) { @@ -222,74 +139,6 @@ do_vgs (void) return convert_lvm_output (out, NULL); } -/* Check whether lvs has -S to filter its output. - * It is available only in lvm2 >= 2.02.107. - */ -static int -test_lvs_has_S_opt (void) -{ - static int result = -1; - if (result != -1) - return result; - - CLEANUP_FREE char *out = NULL; - CLEANUP_FREE char *err = NULL; - - int r = command (&out, &err, str_lvm, "lvs", "--help", NULL); - if (r == -1) { - reply_with_error ("lvm l...
2006 Jan 09
6
Nil column results, possible to ignore?
For a table "clients" there are city, state, and zip fields. However, for some clients we only have a state with no actual address. The following code throws a "You have a nil object" error when outputting my client list. Is there a way around this, short of writing a specific case for each possibility? &lt;%= client.city + '', '' + client.state +
2016 Jan 28
0
[PATCH v2] lvm: support lvm2 older than 2.02.107
...(&ret) == -1) + return NULL; + + return ret.argv; +} + char ** do_pvs (void) { @@ -139,26 +218,72 @@ do_vgs (void) return convert_lvm_output (out, NULL); } +/* Check whether lvs has -S to filter its output. + * It is available only in lvm2 >= 2.02.107. + */ +static int +test_lvs_has_S_opt (void) +{ + static int result = -1; + if (result != -1) + return result; + + CLEANUP_FREE char *out = NULL; + CLEANUP_FREE char *err = NULL; + + int r = command (&out, &err, str_lvm, "lvs", "--help", NULL); + if (r == -1) { + reply_with_error ("lvm l...
2020 Sep 22
2
Unifying CMake variable names used in checks across subprojects
We've been using the runtimes build for a while now and we're very happy with it. However, with an increasing number of targets, it can be fairly slow and I have noticed that we now spend more time in CMake than in Ninja. There are various ways we could improve things like eliminating unnecessary checks. When running checks like check_c_compiler_flag, check_cxx_compiler_flag or
2007 Apr 06
3
How to find rows where no row in associated table exists?
Basically, how do I do this "The Rails Way(tm)" SELECT * FROM beta_users u LEFT JOIN beta_codes c ON u.id = c.beta_user_id AND c.code IS NULL At the moment I''m using find_by_sql, and that works Ok, but what would be the Rails way? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on
2016 Jan 28
0
Re: [PATCH] lvm: support lvm2 older than 2.02.107
On Wed, Jan 27, 2016 at 07:06:46PM +0100, Pino Toscano wrote: > char ** > do_lvs (void) > { > char *out; > CLEANUP_FREE char *err = NULL; > int r; > + int has_S = test_lvs_has_S_opt (); > + if (has_S < 0) > return NULL; I think this doesn't do the right thing on the second failing call to test_lvs_has_S_opt, because it won't return a protocol error? > + /*NOTREACHED*/ > + assert (false); > + return NULL; > } What&...
2006 Jul 25
2
join in legacy DB?
I''ve got a problem with some tables that don''t follow any RAILS standards. how do I define the join in the model when all three tables have wacky names? class Machine < ActiveRecord::Base set_table_name "tbl_CodeMgmt_Host" set_primary_key "Id" end class Pool < ActiveRecord::Base set_table_name "tbl_CodeMgmt_Pool" set_primary_key
2020 Sep 22
2
Unifying CMake variable names used in checks across subprojects
> On Sep 22, 2020, at 15:28, Eric Christopher <echristo at gmail.com> wrote: > > From the "not largely affected" camp: > > - the churn doesn't feel that major for HAS_ and ... > - the uniformity feels nice > > and in general feels nice and in pursuit of the longer term goals here. > > -eric > > On Tue, Sep 22, 2020 at 11:58 AM Petr
2007 Jul 04
3
Testing Rails Associations
Hi, I''m very new to rspec, so if this is not the right forum please let me know. I''m starting to spec my models first in an existing rails app, porting from a mix of Test::Unit, and simply_bdd amongst others. I''m at the point where I want to test that certain associations are present. What I''m not sure of is should I test the association or the method and
2010 Apr 15
12
[PATCH] Add :touch option to has_many associations
Hi, it would be nice to have the touch option in has_many associations also. I have a scenario like this: An user has some credit (money) and some advertises. Each advertise can be enabled or disabled depending on some rules. One of the rules is that the user should have money. Each time the money of the user change, the advertises are touched, enabled/disabled and then cached, as they are much
2020 Sep 25
2
Unifying CMake variable names used in checks across subprojects
> On Sep 24, 2020, at 23:52, Petr Hosek <phosek at chromium.org> wrote: > > Using more interface libraries is definitely the right direction and a modern way to use CMake. I'm not sure if we can get to a single interface target since different runtimes have different requirements. I was assuming that we would have one interface target per dependency and use the existing CMake
2006 Aug 13
0
how to work with has_many :through
I''m trying to understand how to use the has_many :through construct. I have two tables: customers and vendors associated through "assignments" table. Class Customer has_many :assignments has_ many :vendors, :through => :assignments . . . # other fields end Class Vendor has_many :assignments has_many :customers, :through => :assignments . . . # other fields end
2016 Jul 26
0
[PATCH 4/5] daemon: lvm: list PVs/VGs/LVs with --foreign
...ame", "--noheadings", NULL); + str_lvm, "vgs", "--foreign", "-o", "vg_name", "--noheadings", NULL); if (r == -1) { reply_with_error ("%s", err); free (out); @@ -263,6 +263,7 @@ do_lvs (void) if (has_S > 0) { r = command (&out, &err, str_lvm, "lvs", + "--foreign", "-o", "vg_name,lv_name", "-S", "lv_role=public && lv_skip_activation!=1",...
2006 Jul 19
0
Authorization Plugin 1.0 rc3 + Test App
http://www.writertopia.com/developers/authorization Inching toward full release. Minor changes, now lets you set constants for redirection and store locations in environment.rb, and removal of a dumb double redirect error that was introduced during refactoring. Also added an integration test (contributed by David Altenburg) that would have caught the issue. The authorization plugin provides the
2007 Aug 03
0
acts_as_paranoid and Association Extensions (has_one troubles)
Hi... Isn''t there a proper way or hack/workaround for the following? * For the example with unfortunate disabilities.. look below,,, Usage of has_* (associationmethods) do {def with_deleted AccociatedModel#with_scope} {Paranoid''s#find_with_deleted}... The has_one associations give me a nil object when invoking it with Model.association_OBJECT.with_deleted. Has_many does like
2008 Feb 02
16
[patch 00/16] ocfs2: SLES10 compatibility patch queue
Here is the original set of fixes, split out into 14 individual ones. In addition to splitting them out, I also changed the ones that were HAS_* to NO_* as requested. The last two patches are needed to build on openSUSE 10.3 which is based on 2.6.22. I used it as a sanity check and found those failures. -Jeff -- Jeff Mahoney SUSE Labs
2008 Oct 17
1
How to best start from scratch implementing a ERM diagram?
Hey people, I''m starting a new project and just finished creating the ERM diagram with about 30 tables. There are quite some tables with foreign keys so I''m not sure how to start creating the controllers/models. How should I start creating controllers/models? Should I first create all tables without foreign key? Should I just start somewhere and add them radomly? I''m