Thanks for your detailed explanation Jeremy... for now I've gone back
to 1.4.0 as it was working well for my apps which use the ODBC and ADO
adapters.
On May 9, 1:00 am, Jeremy Evans [EMAIL PROTECTED] wrote:
On May 7, 10:05 pm, Davo [EMAIL PROTECTED] wrote:
Hi,
I originally posted this in
, but it
seems that inconsistency is bad behaviour for base Sequel.
What do you think about it?
Thank you for your opinions. Greets.
--
David
--
You received this message because you are subscribed to the Google Groups
sequel-talk group.
To unsubscribe from this group and stop receiving emails
a custom create? method with the
above INSERT WHERE NOT EXISTS syntax on MyDoc model? Also might support
for this this make sense as a Sequel extension?
Thanks,
David
--
You received this message because you are subscribed to the Google Groups
sequel-talk group.
To unsubscribe from this group
Back in July I had asked and received helpful suggestions about doing
"Conditional INSERT to PostgreSQL" [1]. I'm now trying to take advantage
of the PostgreSQL 9.5 "ON CONFLICT" feature as a solution. Starting with
the simplest case, I previously had as a Model ClassMethod and peer to
On Wednesday, December 30, 2015 at 12:18:45 PM UTC-8, Jeremy Evans wrote:
>
> This will probably work for what you want:
>
> def create?( h )
>c = dataset.returning.insert_ignore.insert(new(h).values).first
>c && call( c )
> end
>
Thanks very much for the pointer. With some more
it (I talk about _fetch use for
returning data) I get a "deprecation" warning.
We are in process for adopting Sequel 5 ASAP, so my question is: how can I
mock Model data in Sequel for testing 5 versions?
Thank you very much.
--
David
--
You received this message because you are subs
about the mock adapter, please post them
> here.
>
I can't use with_fetch with proc for defining return data from query info.
--
David
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop
El martes, 17 de abril de 2018, 19:28:01 (UTC+2), Jeremy Evans escribió:
>
> For fully mocked tests, Sequel ships with a mock adapter you can use.
Great! Where can I find good example documentation?
--
David
--
You received this message because you are subscribed to the Google
t;
I am interested in your opinion about identity map. Why do yo think it
causes more problems that it solves?
Thank you for your hints :)
--
David
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group an
ess environment, so there is no problem of complex cross
logic between users. In that context, Identity Map is very useful :)
--
David
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving email
are best code points for resolving my needs?
Thank you very much.
--
David
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sequel-talk+unsubscr...@google
f3]
Do you see these requirements logical? If we have reciprocal and object
assignation, I think these are two annoying Sequel effects that go against
"least surprise" principle.
Greets.
--
David
--
You received this message because you are subscribed to the Google Groups
"sequel-ta
El lunes, 5 de marzo de 2018, 20:55:40 (UTC+1), Jeremy Evans escribió:
>
> On Monday, March 5, 2018 at 9:00:38 AM UTC-8, David wrote:
>>
>> Hi everybody.
>>
>> Look at this code:
>>
>> class Foo < Sequel::Model
>> one_to_many :bars
>>
You guys might already be aware of this, but SQLDSL by Jay Fields
already supports this type of direct ruby-to-sql.
http://sqldsl.rubyforge.org/
It could be helpful to collaborate SQLDSL.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Maybe the code used for arrayfields (which has been deprecated?) can
be used for this.
Reference discussion: modeling tuples with hash vs array (http://
groups.google.com/group/sequel-talk/browse_thread/thread/
61b9ad363bec5fbf)
The arrayfields were slower than array of hashes because of the
The reason I suggested this to be included in the main code was so
that it could be speedy if indeed the underlying database gives the
ruby connection an array of arrays rather than an array of hashes.
My suggestion was to have a way to _leave_ the data as an array of
arrays (if that is what is
What is the best way to accomplish this with sequel as it is now?
Does calling datasets.each cache the resulting hashes?
If not, we could allow there to be datasets.each_array for the block
argument to be an array instead of a hash.
Modifying your example:
def getrows(table = :mytable, cols
Perhaps a better (or just another) way to implement checks would be to
add constraints as such:
DB.create_table :users do
...
varchar :full_name
varchar :birthdate
char :ssn, :size = 9
integer :age
boolean :citizen
...
constraint :legal_voter, :check = lambda
The automagic validation thing might be pretty cool to have in Sequel-
Model, although I'm not sure how much of the more complex checks can
be translated into ruby validations.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
I wish validations were tightly integrated into the database.
Validations are something that ActiveRecord was not good at.
For example, validating uniqueness or presence of an associated object
would actually not enforce validation (under rare race conditions).
This is because it is impossible
Errors are, as you say, database-specific.
However, we already do have database specific code, so it won't be
causing any portability issues that were not there in the first place.
That said, perhaps the simplest way of getting this started is to
implement the database_validates_constraint
instead of database_validates_xxx we should say
database_constrains_xxx.
We could be more precise and call it
depends_on_database_to_constrain_rows_based_on, but that would be
silly. :)
--David
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Once again,
I'm not saying we should support constraints WITHIN the model.
Let me state my assumptions:
- validations exist to give users a nice error message to prevent
models from being saved, because otherwise, the database will raise a
nasty error
- validations do not validate 100%
-
Why don't we have Sequel::Model raise real errors?
That way, we can have #save have a catch-all that catches all errors,
regardless of whether they arise from Sequel::Model validations, or
from the underlying database.
Model validation errors can be inherited from
Sequel::Model::ValidationError
Amazing...
Were you working on full-text searching previously, or did you start
after I mentioned it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sequel-talk group.
To post to this group, send email to
I'm using FreeTDS to connect to SQL Server using ODBC and am getting
errors for different things:
irb(main):001:0 Certificate.columns
ODBC::Error: 37000 (170) [FreeTDS][SQL Server]Line 1: Incorrect syntax
near '1'.
irb(main):003:0 Certificate.first
ODBC::Error: 37000 (170) [FreeTDS][SQL
Hi, I wanted to do this:
x = DB[:Certificates]
x.join(
x.select(
:MAX[:modified], :serial
).group(:serial), {:modified = :modified, :serial = :serial}
)
But the resulting sql turns into:
SELECT * FROM Certificates INNER JOIN #Sequel::ODBC::Dataset:
0xb73ec97c ON
The Dataset#multi_insert method can also take a :commit_every option
that specifies how often to commit the transaction. This is useful
when youinserta large number of records and want to keep the
transaction size manageable. For example:
DB[:items].multi_insert([{:value = 1}, {:value =
DataMapper will probably be faster than AR or Sequel in the long run
as they write their own database drivers in C (DataObjects).
Doesn't AR do this as well? And will Sequel support C drivers in the
future?
I think the performance hit comes from the way models are constructed,
but I'm not too
The following is probably old-hat for some, but others might find it
interesting if not useful:
http://www.xaop.com/blog/2007/10/07/video-how-to-create-a-domain-spec...
I like the DSL that they demonstrate in the link you provided.
I think we might be able to get something very close to
How would you negate a statement using this DSL?
I would prefer to go the hash way if we can only implement the DSL
half-way.
For instance, p.author_id == nil would work, but p.author_id != nil
would not work.
You would not be able to negate blocks of conditions: !(p.date
Date.today) would not
Shawn, Thanks for the notice.
Jeremy, I sent you a pull request with a fix.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sequel-talk group.
To post to this group, send email to sequel-talk@googlegroups.com
To
post = Post.create
user = User.create
post.user #= nil
user.posts #= []
post.user = user
post.user #= user
user.posts #= [] (should be [post])
post.save
user.posts #= still [] (should be [post])
--~--~-~--~~~---~--~~
You received this message because you are
I thought this was already implemented, but I guess not:
User[1].object_id == User[1].object_id #= false (should be true)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sequel-talk group.
To post to this group,
PostgreSQL seems to only have one binary type: bytea.
One big problem is that Ruby does not have a binary class.
Another problem is that a PostgreSQL statement (insert/update) does
not seem to support inputting binary data. That means all binary data
must be escaped in the PostgreSQL style as
class User Sequel::Model
set_primary_key :user_id
has_many :posts
end
class Post Sequel::Model
belongs_to :user
end
I'm suspecting that changing the primary key has something to do with
it.
--~--~-~--~~~---~--~~
You received this message because you are
class Post Sequel::Model
belongs_to :user
validates_presence_of :email
validates_presence_of :hidden
end
post = Post.new :user = User.create
post.valid? #= false, that's good
post.hidden = false
post.valid? #= false, should be true
Upon fixing this, I suggest that Model#create and
1) We could use the db_schema to see if the column is a boolean and
consider false as present just for booleans
2) We could add validates_inclusion_of:
validates_inclusion_of :hidden, :in=[true, false]
3) We could add validates_boolean: validates_boolean :hidden
4) We could modify save to
If you want conditions on the join, you can already do something
similar:
DB[:table1].join(:table2, [[:x,true], [:y,true], [:z, true],
[true, :x], [true, :y], [true, :z]])
This is better than using the filter call, as it applies the
conditions to the join instead of the entire query.
Here are some ideas that I proposed couple months ago to this google
group:
http://groups.google.com/group/sequel-talk/browse_thread/thread/be01496791052af0
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prepared Statements: This would allow you to prepare a statement once
and call it multiple times with different inputs. This is potentially
much faster on certain databases, up to 60% on PostgreSQL, and from
what I've heard possibly more on Oracle. Here's how I think it should
work:
You can't do either in 2.11, unless you apply the plugin/define the
method in all of the subclasses.
can you do:
class MyModel Sequel::Model
def set_only(*args)
old = strict_param_setting
self.strict_param_setting = false
begin
super
ensure
I vote for:
Post.references User
User.referenced_by Post
# and if you want to support many_to_many
Tag.references_many :posts, :through = 'posts_tags'
Also, have you considered auto-generating these associations from the
database schema? I think it would be pretty cool to have these
When you do:
Item.eager_graph(:user).all.first.type
you get the type Item. However, when you do:
Item.eager_graph(:user).each {|x| puts x.type}
x will be a Hash. I expect each to pass Item objects instead of Hashes
to the block.
--~--~-~--~~~---~--~~
You
I know I can do this:
Item.dataset.full_text_search [:name], 'Search Stuff'
But this returns hashes instead of Item objects. I was wondering if we
can have this:
Item.full_text_search [:name], 'Search Stuff'
--~--~-~--~~~---~--~~
You received this message
Shouldn't #each implicitly do what #all does (set up all associations)
before returning? I really think all.each and each should behave
exactly the same.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sequel-talk
You could make the same argument for Dataset#graph. Unless you
specify a row proc, Dataset#each always yields
a hash with column symbol keys and column values, the only place where
is pattern breaks is with graph,
which changes Dataset#each to return a hash with table symbol keys,
and hash
eager_graph.map returns an array of hashes with model object values.
If all was an alias of map, eager_graph.all wouldn't return model
objects with cached associations.
That's exactly what I'm suggesting. Here's a break down, including a
new name include (taken from ActiveRecord) instead of
dynamically (against some argument, in this case params[:id]).
I feel like there would be something to the effect of:
Post.eager_graph(:comments).eager_filter(:user_id = params
[:id]).eager_limit(1)
but I can't find it.
Can you help me with this?
--David
I'm really lost for how to properly use models. I understand how to
use Sequel for stuff like the short example on the front page (http://
sequel.rubyforge.org/), creating a table and dataset, inserting,
finding and updating items on the dataset. Pretty much everything in
the Cheat Sheet makes
Scott,
Thanks for that! Shocked I didn't run across those in my googling
before. A ton of good data. Bookmarked.
dave
On Thu, Jun 4, 2009 at 3:37 PM, Scott LaBounty slabou...@gmail.com wrote:
David,
Don't know if this will fully answer all your questions, but I've tried to
document what I
In my experience, Sqlite3 doesn't handle most strings well for date
comparisons. It works sometimes, but not always. Postgres has treated
me much better so far in this regard.
dave
On Thu, Jul 2, 2009 at 12:49 PM, Scott LaBountyslabou...@gmail.com wrote:
Jeremy,
Here's what I'm trying:
I wanted to propose a way to generate a more accurate changed_columns.
Currently, Model#[]= sets the changed_columns array whenever the new
value is not equal to the old value. As explained in the
documentation, this approach fails when a new value is unequal before
typecast but equal after
(:name = 'david')
x.name.gsub! 'david', 'dave'
x.save #= no change
x.name = 'dave'
x.save #= no change
# Problematic only in new implementation
x.name = x.name.gsub!('david', 'dave')
x.save #= no change, but would have changed in previous implementation
I just added #saved_values and #changes because they were easy to
implement given the new way to detect changes.
Those methods don't have to be added (#saved_values can just be
private).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
That did it, thanks!
The working code for those interested:
require 'rubygems'
require 'sequel'
gem('mysql') # = because I didn't remove the pure mysql driver
#DB = Sequel.connect(:adapter='mysql', :host='localhost',
:database='finqueries', :user='root', :password='')
DB =
Well, I got it (Sequel + odbc) working, altho I'm not exactly sure how. I
went down a number of roads, including trying to get ruby-odbc (
http://www.ch-werner.de/rubyodbc/) installed -- which never succeeded. But
in order for that to work, I had to install unixODBC 2.x or libiodbc 3.52
on UN*X,
Nevermind, I just used raw SQL.
On Thu, Aug 13, 2009 at 10:21 PM, dj djenkins...@gmail.com wrote:
I've got a stored procedure on a DB I'm accessing through ODBC (for
Sequel); when I use it natively, I use this syntax:
Select * from getcrossdata('MSFT', '1986-03-13', '2009-08-12')
(the
Thanks, Jeremy.
I tried
dataset = DB['SELECT * from getcrossdata(\'MSFT\', \'1986-03-13\',
\'2009-08-12\')']
where the raw SQL natively (i.e., in an isql session) takes about 1.5
seconds to return the dataset, and using Sequel I killed it after about 2
minutes.
I then tried your syntax, and it
I'm using mysql; I create a dataset via this command:
dataset = DB['call GetInstRecs(\'MSFT\', \'S\')']
where, obviously, GetInstRecs is a stored procedure in mysql which returns a
field named weekendday, among others. It's of type smallint.
When I try this:
dataset.map do |r|
if
Hi,
Sequel::Model's #limit/offset don't work using jdbc mssql because the
row_proc to instantiate Model objects is being called before mssql's
#each override gets to remove the row_number value.
I would not suggest taking the quick fix approach to check if the
yielded object (in mssql's #each's
running has actual
non-comment code on those lines) -- the file in question being mysql.rb.
On Fri, Sep 25, 2009 at 3:10 PM, John W Higgins wish...@gmail.com wrote:
On Fri, Sep 25, 2009 at 11:49 AM, David Jenkins djenkins...@gmail.comwrote:
tried p r[:weekendday].class, all Fixnum
:(
Try
FWIW, Figured out the NetBeans bug: it's actually hitting my breakpoints in
my little test file (at lines 12, 19, and 20, in the current version), but
for some reason it keeps showing the mysql.rb file, which contains comments
at those lines.
On Fri, Sep 25, 2009 at 3:19 PM, David Jenkins
:\x0Ehighprice0:\rlowprice0:\x0Fcloseprice0:\vvolume0:\x11openinterest0)[:weekendday]
== 1
= true
On Fri, Sep 25, 2009 at 12:46 PM, David Jenkins djenkins...@gmail.com
wrote:
Perhaps you can post the results of p(Marshal.dump(r)) for both cases:
with the select, and with the stored procedure
I was wondering if anybody has used Sequel with Rails' I18n module. It
would be great if Sequel Models could support all the localizations
that ActiveRecord supports--localization of Model names, columns/
attributes, and validations.
If Sequel does not work with Rails' I18n out of the box, what
Right now, I have some logic that runs inside the after_save hook, but
those aren't getting called when I call #save() if there have been no
changes to values. I'm not sure if the correct behavior is to always
be called after #save() or only be called after a real UPDATE/INSERT.
I'm thinking it
Actually, I was calling #update. Doing a #set and then a #save
successfully calls the after_save hook. I'm not sure if #save_changes
(), and more specifically, #update(), should be skipping the
#after_save hooks when there are no changed columns, although, as I
expressed in the original post, I'm
1) Skips saving completely if the record has not been modified.
2) Saves only the changed columns if the record has been modified.
I agree with this behavior. What I'm calling into question is if
skipping saving should also skip all hooks. I think a more compelling
case is the #after_update
Identity map does not unmap destroyed objects. Sequel should unmap the
destroyed objects like this:
x = SomeModel[1]
x.nil? #= false
x.destroy
y = SomeModel[1]
y.nil? #= true
Instead, it current does this:
x = SomeModel[1]
x.nil? #= false
x.destroy
y = SomeModel[1]
y.nil? #=
I didn't get a chance to look at your code much there, but it seems
like you should be able to do this much quicker. 22GB isn't all that
big of a database to begin with (something you could hold in memory
likely), so I'm wondering if there's some server-level optimization
that you need to do.
I've been using Homebrew (http://github.com/mxcl/homebrew) to do most
installing tasks these days- just as a helpful hint (if you're on a
Mac)
-David
On Wed, May 19, 2010 at 9:10 AM, Scott LaBounty slabou...@gmail.com wrote:
I just got a new machine after my old one died and I'm rebuilding
of that, this is my first patch to sequel. Is there a guide
to testing / doc practices somewhere?
david
--
You received this message because you are subscribed to the Google Groups
sequel-talk group.
To post to this group, send email to sequel-t...@googlegroups.com.
To unsubscribe from this group, send email
RVM + Homebrew changed my life and re-grew my hair!
No seriously, the combination is awesome.
On Tue, Oct 5, 2010 at 10:45 PM, Michael Lang mwl...@cybrains.net wrote:
Yeah, I griped about that one in one of the IRC channels...turns out
there's a rubygems_snapshot gem that will package up the
wrote:
So Homebrew looks to be something for Macs only?
Scott
On Wed, Oct 6, 2010 at 7:00 AM, GregD gditr...@fuse.net wrote:
On Oct 5, 11:32 pm, David Fisher tib...@gmail.com wrote:
RVM + Homebrew changed my life and re-grew my hair!
No seriously, the combination is awesome.
+1
the issue.
Thanks!
-David
--
You received this message because you are subscribed to the Google Groups
sequel-talk group.
To post to this group, send email to sequel-talk@googlegroups.com.
To unsubscribe from this group, send email to
sequel-talk+unsubscr...@googlegroups.com.
For more options, visit
)}
Is there a cleaner way to do this? Maybe someone already wrote a plugin?
--David
--
You received this message because you are subscribed to the Google Groups
sequel-talk group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sequel-talk/-/Zzhpok2wUiUJ.
To post to this group
Thanks, I guess I can do this:
db[:people].where(Sequel::SQL::BooleanExpression.new(operator, column,
value))
How would it work for unary operators, like NOT NULL?
Also, is explicit usage of Sequel::SQL::BooleanExpression a supported
public API (same guarantees of backwards compatibility)?
Hi, I wanted to use the pg_row extension for composite types that can be
created/altered/dropped during runtime.
How can I get pg_row to react properly to changing composite types?
Also, I'm getting NoMethodError when calling register_row_type:
1.9.3p194 :003 Sequel.extension :pg_row
=
So apparently the documentation for how to use PGRow is wrong.
I got the NoMethodError resolved by extending the Database object instead
of Sequel:
Sequel::Model.db.extension :pg_row
Also, it seems like calling register_row_type on the same type will
overwrite the previously registered row
Thanks Jeremy.
I don't know where I got the example for Sequel.extension... maybe I read
the docs for pg_row_ops and got confused.
It seems like your suggestion for manual parsing is the best way about this.
--
You received this message because you are subscribed to the Google Groups
I am using Sequel on an application that is composed of about half a dozen
sinatra services. These services use Sequel::Model.db to connect to
postgres via some shared logic that is installed as a gem
'sequel_connection'. That connection logic is pretty simple. Here it is.
module Persistence
in the sinatra file. Can i call
disconnect at the end of that init file?
On Saturday, October 20, 2012 12:52:20 PM UTC-4, Jeremy Evans wrote:
On Saturday, October 20, 2012 8:28:06 AM UTC-7, David Ott wrote:
I am experiencing trouble with the connections dropping and not being
re-establised. The air
I'm experimenting with AWS' RedShift. Its interface is postgres. Pretty
slick.
But their postgres variant doesn't respond to the SET commands that are
issued during an initial Sequel connection. Specifically:
SET standard_conforming_strings = ON;
ERROR: unrecognized configuration parameter
Thanks! That seemed to do the trick. RedShift is based on Postgres 8.0.2,
so I was warned that some things may not work... but so far so good.
On Tuesday, July 16, 2013 12:53:29 PM UTC-4, Jeremy Evans wrote:
On Tuesday, July 16, 2013 9:32:16 AM UTC-7, David Kulp wrote:
I'm experimenting
the relevant extensions on my DB:
Sequel.extension :core_extensions, :inflector
Sequel.extension :pg_array, :pg_array_ops
require 'sequel/plugins/serialization'
David
--
You received this message because you are subscribed to the Google Groups
sequel-talk group.
To unsubscribe from this group and stop
= ('serial=1') WHERE (id = 1)
Which is missing the coercion to array (probably connected to the fact
that after the create,
n.hw_info is an Array, not a PGArray)
Any help is much appreciated.
David
On Tue, Sep 3, 2013 at 5:53 PM, Jeremy Evans jeremyeva...@gmail.com wrote:
On Tuesday, September 3
That did the trick. Awesome, thanks.
David
On Tue, Sep 3, 2013 at 7:21 PM, Jeremy Evans jeremyeva...@gmail.com wrote:
On Tuesday, September 3, 2013 6:31:41 PM UTC-7, David Lutterkort wrote:
Hi Jeremy,
thanks for the quick reply; unfortunately, that does not seem to make a
difference
# This doesn't work, but I'd like to do something like this so that
# ultimately the update query looks like
# update nodes
# set last_checkin = now()
# where id = :some_id
self.last_checkin = Sequel.function(:now)
save_changes
end
Is something like that possible ?
David
Given the following models:
class Plan Sequel::Model
one_to_many :user_plans
end
class User Sequel::Model
one_to_many :plans, class: UserPlan
end
class UserPlan Sequel::Model
many_to_one :user
many_to_one :plan
end
I'd like to have chainable filters on UserPlan that filter on
; end; end; end
After migrating, the repos table has the correct constraint; unfortunately,
the url_is_simple validation is missing from sequel_constraint_validations.
Is there another way to achieve this ?
David
--
You received this message because you are subscribed to the Google Groups
Hi Jeremy,
thanks for hte response; yes, that workaround is perfectly fine, and I can
live with that.
David
On Thu, Oct 10, 2013 at 5:27 PM, Jeremy Evans jeremyeva...@gmail.comwrote:
On Thursday, October 10, 2013 4:12:08 PM UTC-7, David Lutterkort wrote:
Hi,
in my DB schema I previously
I'm trying to write the cassandra cql-rb adapter for sequel, and I have a
working branch here:
https://github.com/dleung/sequel/tree/adapter/cassandra. I'm trying to run
the database integration tests, specifically:
@db.create_table!(:items){Integer :i}
# = Cql::QueryError: No PRIMARY KEY
Thanks, Jeremy!
On Friday, November 8, 2013 5:18:48 PM UTC-8, Jeremy Evans wrote:
On Friday, November 8, 2013 4:47:58 PM UTC-8, David Leung wrote:
I'm trying to write the cassandra cql-rb adapter for sequel, and I have a
working branch here:
https://github.com/dleung/sequel/tree/adapter
sequel-talk+unsubscr...@googlegroups.com
On Sun, Feb 2, 2014 at 1:05 AM, sequel-talk@googlegroups.com wrote:
Today's Topic Summary
Group: http://groups.google.com/group/sequel-talk/topics
- after_commit with transactional
tests#143f1d820a09225f_group_thread_0[1 Update]
- Sequel
I'm on Debian linux running ruby 2.3.0; I have these gems installed:
$ gem list --local | egrep 'sequel|pg|postgres'
pg (0.18.4)
sequel (4.32.0, 4.30.0)
sequel_pg (1.6.14)
When I try to connect to a postgres server with "adapter => 'postgres'",
the connection works, but if I say "adapter =>
pany
end
c = Company.first
c.freeze
------>8
Greets.
--
David
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an e
.../...
> You could work around this issue by overriding Company#freeze to call
> positions before calling super.
>
Thank you. I have a work around applied already. It is enough that it is
solved by now ;)
Greets.
--
David
--
You received this message because you are subscribed t
2016-09-01 10:34 GMT+02:00 David Espada <da...@abstra.cc>:
>
> 2016-08-31 18:40 GMT+02:00 Jeremy Evans <jeremyeva...@gmail.com>:
>
>> plugin :instance_hooks
>>
>> def association=(v)
>> after_save_hook{super}
>> end
>&g
ably write your
> only plugin, or just do:
>
> plugin :instance_hooks
>
> def association=(v)
> after_save_hook{super}
> end
>
=8)
Is this code valid for all association types? If so, great!
I'll try it. Thank you very much.
--
David
--
You received
2016-09-01 10:51 GMT+02:00 David Espada <da...@abstra.cc>:
> I have tested and it doesn't wotk :(
>
Ouch! Now I understand that your example is not generic code, but a
redefinition of specific association code. Sorry :)
--
David
--
You received this message because you ar
1 - 100 of 118 matches
Mail list logo