On Jul 31, 11:02 am, Xavier Lange wrote:
> Ah, okay, I understand that.
>
> I have one question, though, how should JSON be initialized? What
> should the plugin do if JSON is not already loaded when the
> model.plugin(:serialize, :json, :field) call is made?
Nothing. It's the user's responsibi
On Jul 31, 10:34 pm, zboage wrote:
> it support stored procedures in ms SQL Server? How to get the return
> value?
The JDBC adapter supports stored procedures, and it might work on SQL
Server. I haven't tried it, though.
Jeremy
--~--~-~--~~~---~--~~
You received
Sequel 3.3.0 has been released and should be available on the gem
mirrors. The 3.3.0 release adds numerous improvements:
New Features
* An association_proxies plugin has been added. This is not a
full-blown proxy implementation, but it allows you to write code
such as:
ar
On Aug 3, 10:16 am, Scott LaBounty wrote:
> It looks like I'm doing something wrong so I'm not getting the mySQL
> adapter. I have a problem when I try to do a migration:
>
> slabou...@slabounty-laptop:~/RamazeTutorial/Library2$ sequel -m dbMigration/
> mysql://libraryMySQL.db
> Error: Sequel::Ad
On Aug 3, 12:26 pm, Scott LaBounty wrote:
> Jeremy,
>
> Here's what I get:
>
> slabou...@slabounty-laptop:~/RamazeTutorial/Library2$ irb -rubygems -rmysql
> /usr/local/lib/ruby/1.9.1/irb/init.rb:262:in `require':LoadError: no such
> file to load -- mysql
I'm guessing the mysql gem installation e
On Aug 3, 3:54 pm, Scott LaBounty wrote:
> Yep, didn't complete. Any recommendations on where to install from?
The first Google link for "mysql ruby" is http://www.tmtm.org/en/mysql/ruby/.
Jeremy
--~--~-~--~~~---~--~~
You received this message because you are sub
On Aug 4, 1:26 am, Shawn Van Ittersum wrote:
> Hmm, when I change the code to db.execute(), I get this error:
>
> /usr/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/adapters/
> mysql.rb:196:in `close': Mysql::Error: Commands out of sync; you can't
> run this command now (Sequel::DatabaseEr
On Aug 4, 10:44 am, "Pablo Q." wrote:
> Hi folks,
>
> I need help, I have been trying to connect to sql server using odbc
> without success.
>
> This is the code that I'm using:
>
> db = Sequel.odbc(mydb, :user=>
> my_user,password=>my_pass,:db_type=>'mssql',:driver=>'{SQL Server}')
> db[:mytable
On Aug 4, 3:02 pm, "Pablo Q." wrote:
> Hi Jeremy,
>
> I have solved the connection (using odbc) doing like this:
>
> db = Sequel.connect(:adapter=>'odbc',:driver=>'SQL
> Server',:server=>'localhost',:uid=>user,:pwd=>pass,:database=>mydb,:db_type=>'mssql')
Well, I'm glad that is working for you.
Currently, Sequel doesn't really pay much attention to time zones.
When putting datetime values in the database, it generally omits the
time zone information. When retrieving times, it just uses the parse
method of the datetime_class, so if the string doesn't include time
zone information, ruby w
On Aug 4, 11:58 pm, "cristian.malinescu"
wrote:
> Hi,
>
> I try to launch a Merb app where I replaced the default datamapper orm
> with Sequel, however, I'm stuck at this error:
> ../gems/mysql-2.7/lib/mysql.so: warning: already initialized constant
> MysqlError.
Well, that's a warning, not an e
On Aug 5, 4:10 pm, dj wrote:
> Something stupid no doubt, but I verified the settings, which work
> fine via this api:http://www.tmtm.org/en/ruby/mysql/
>
> here's the code:
>
> require 'rubygems'
> require 'sequel'
>
> #DB = Sequel.connect
> (:adapter=>'mysql', :host=>'localhost', :database=>'fi
On Aug 5, 4:27 pm, Jeremy Evans wrote:
> This error is common enough that I should write have Sequel check for
> it and report a better error.
Done:
http://github.com/jeremyevans/sequel/commit/051d8972b96b94caed9cd2b31afb9141af373f81
On Aug 5, 5:29 pm, dj wrote:
> Code:
>
> require 'rubygems'
> require 'sequel'
> DB = Sequel.connect('interbase://SYSDBA:master...@192.168.0.81:3050/
> finqueries')
> dataset = DB["SELECT pricedate FROM pricedata"]
> puts dataset.count
>
> full error log:
>
> /usr/lib/ruby/gems/1.8/gems/sequel-3.
On Aug 6, 7:00 am, byrnejb wrote:
> Three questions:
>
> How is :local determined? If by the host local time then this would
> have consistency implications for host transfers or multi-host
> support. I realise that using UTC is indicated in these situations,
> but sometimes the utc approach
On Aug 6, 10:47 am, dj wrote:
> Hi folks,
>
> I tried this:
>
> DB = Sequel.connect
> (:adapter=>'odbc',:driver=>'Firebird',:server=>'192.168.0.81',:uid=>"xxx",:pwd=>"xxx",:database=>"finqueries")
>
> and I get this:
>
> /usr/lib/ruby/gems/1.8/gems/sequel-3.3.0/lib/sequel/database.rb:112:
On Aug 6, 2:49 pm, Scott LaBounty wrote:
> Here's what I have for a search I'm doing:
>
> @search_response = Book.filter([:title,
> :description].sql_string_join.like("%...@search_string}%")).all
>
> This works great for a simple search string like "sequel" or "ramaze" but if
> I have two
On Aug 6, 4:23 pm, Clive Crous wrote:
> 2009/8/7 Jeremy Evans :
>
> > What you want is already exists in Dataset#grep
>
> Well look at that, and here I've been doing this manually. Thanks Jeremy.
>
> Jeremy: Do you plan any support for postgres's ` .similar `
&
On Aug 6, 7:43 pm, Shawn Van Ittersum wrote:
> Hi Jeremy,
>
> Will the db << string syntax raise an error if there is something
> wrong with the SQL? And can I execute the SQL inside a transaction,
> to rollback everything in case something goes wrong?
Yes, Sequel will raise an error if the dat
On Aug 6, 8:28 pm, Shawn Van Ittersum wrote:
> Actually, any substring of non-word characters, not just spaces and
> tabs:
>
> def underscore(s)
> s = s.to_s
> return s.underscore if s.respond_to?(:underscore)
> s.gsub(UNDERSCORE_MODULE_REGEXP, SLASH).gsub
> (UNDERSCORE_CONV
On Aug 7, 1:31 am, Clive Crous wrote:
> Hi,
>
> Does anyone know how to get around the fact that a model association
> automatically prepends a "select tablename.* from" to a dataset as set
> within the model association definition?
>
> I'm using postgres and when the dataset as defined in my man
On Aug 7, 5:46 am, Scott LaBounty wrote:
> Thanks to all the help I've received on the two lists, I've written up a
> short post on search using Ramaze and Sequel. Take a look
> at:http://steamcode.blogspot.com/2009/08/ramaze-sequel-and-search.htmland let
> me know what you think.
It looks pret
On Aug 7, 3:11 pm, Shawn Van Ittersum wrote:
> Is there a reason why db.execute is a public method, if it shouldn't
> be called from outside Sequel? I had thought it was safe to call
> because it was public.
Historical behavior/backwards compatibility. When I took over
maintenance, all of Sequ
On Aug 8, 1:28 am, Eleo wrote:
> It seems Sequel converts tinyint fields of any size to true/false.
> I'm not sure but looking at various parts of the code it seems the
> intention is it only do this to tinyint(1) columns, although it's
> affecting my tinyint(4) columns as well. I was hunting th
On Aug 8, 11:51 am, Eleo wrote:
> I find the wording to be a bit confusing.
>
> >When parsing the schema, now only tinyint(1) columns are now considered as
> >boolean, instead of all tinyint columns.
> >Unfortunately, due to limitations in the native MySQL driver, all tinyint
> >column values a
On Aug 8, 11:29 am, Eleo wrote:
> That really sucks.
Agreed. But if you use MySQL, you should be used to suckiness. :)
Jeremy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this gr
On Aug 8, 6:30 pm, Eleo wrote:
> > The native MySQL driver returns a type number for each column in the
> > result set. The same type number is used for both tinyint(1) columns
> > and tinyint(4) columns. If the setting is used, any column with that
> > type number is converted to a boolean. T
On Aug 9, 8:57 pm, Shawn Van Ittersum wrote:
> Hi Jeremy,
>
> I was just coming to post an idea for a better way to handle tinyint
> bools, and found this thread at the top of the recent list.
>
> Because I don't like Sequel converting all my tinyints to bools, I
> disabled that setting in my pro
On Aug 9, 9:39 pm, Shawn Van Ittersum wrote:
> How hard would it be to make 'execute' safe for public use, or to
> rename it so that a new public method 'execute' could be added? From
> an end user perspective, I think db.execute('...') is a much more
> readable syntax than db << '...'. Readabi
On Aug 12, 2:18 am, pure wrote:
> I update gem
>
> gem update --system
> sudo gem install sequel
>
> then
>
> require 'rubygems'
> require 'sequel'
>
> DB = Sequel.sqlite # memory database
>
> DB.create_table :items do
> primary_key :id
> String :name
> Float :price
> end
>
> items = DB[:it
On Aug 12, 8:54 am, Sam wrote:
> Hey everyone,
> How do I perform a case insensitive select statement in sequel?
>
> For example, if I have a user with the username 'BobSmith', I would
> like to be able to query the database with "User[:username =>
> 'bobsmith']" (also somehow specifying case
On Aug 12, 9:56 am, "Pablo Q." wrote:
> Hi folks,
>
> Is there an way to change the tablespace to create tables and indexes
> in oracle?
> For example:
>
> db.add_index :servers, :name
>
> creates the index on the default tablespace setup on my oracle client.
> I would like to use the add_index f
On Aug 12, 10:40 am, Piotr Szotkowski wrote:
> Jeremy Evans:
>
> > Yes. On MySQL, String is varchar(255), while String :text=>true is
> > text. On PostgreSQL, String is text and String :text=>false is varchar
> > (255). This is because MySQL's text type has li
On Aug 12, 4:24 pm, Shawn Van Ittersum
wrote:
> How does Dataset#fetch_rows call Database#execute with adapters that
> don't support Database#execute?
On all adapters, Dataset#fetch_rows works with Database#execute. The
Database#execute API is adapter-dependent and it's specifically
designed to
On Aug 12, 4:31 pm, Shawn Van Ittersum
wrote:
> I did not mean to suggest that [] would be supported on model
> objects. I was suggesting that Hash results returned by db
> [:table_name].filter(...).all (Sequel core) would have both integer
> and boolean values for each tinyint column, the integ
On Aug 13, 10:54 am, Tal wrote:
> Whenever I try to use the .distinct method on a dataset using mysql it
> says it doesn't support mysql.
>
> It seems strange that I can't figure out how to get it working because
> mysql definitely supports distinct in queries.
Are you are sure you are using .di
On Aug 13, 2:29 pm, Tal wrote:
> On Aug 13, 2:54 pm, Jeremy Evans wrote:
>
> > On Aug 13, 10:54 am, Tal wrote:
>
> > > Whenever I try to use the .distinct method on a dataset using mysql it
> > > says it doesn't support mysql.
>
> > > It s
On Aug 13, 7:21 pm, dj 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 store procedure, obviously, is 'getcrossdata', and it takes 3
> par
On Aug 17, 11:48 am, Adrian Madrid wrote:
> Active Record has a plugin [1] that provides with "list" functionality
> (move_lower, move_higuer, etc) [2] based on a "position" field.
I don't know of an existing plugin for Sequel that does that. You
could give it a shot if you need it, it shouldn'
On Aug 17, 1:48 pm, Adrian Madrid wrote:
> Thanks! I knew there used to be something like it but I couldn't find it.
> I'll check it out and see how that goes.
There is sequel_orderable, which is actually hosted in the Sequel
rubyforge page. I hadn't bothered to look at it till today, but a
cur
On Aug 18, 6:06 am, Shawn Van Ittersum
wrote:
> On Aug 12, 5:39 pm, Jeremy Evans wrote:
>
> > Why use method_missing? The model knows which columns are booleans/
> > tinyints, you should be creating specific attribute? accessors for
> > those columns. method_missing
A preliminary patch for the UTC support is available at
http://pastie.org/587930.txt.
It's specced and has been tested on the adapters I usually test with.
DataObjects appears to have problems with some of the integration
tests, but most of the other tested adapters appear to work.
I plan to ap
On Aug 18, 5:01 pm, Jeremy Evans wrote:
> A preliminary patch for the UTC support is available
> athttp://pastie.org/587930.txt.
A modified version of this patch was just committed:
http://github.com/jeremyevans/sequel/commit/8eb8cf642a21e870f57be6627282738eade47068
On Aug 20, 6:18 am, Simon Arnaud wrote:
> Hi
>
> I think I found a bug in the drop_column implementation of the SQLite
> adapter.
>
> I have a migration which add a few columns to a table. So, the down
> method chains the drop_columns like this :
>
> def down
> alter_table :foo do
> drop_co
On Aug 20, 7:16 am, Paul F Fraser wrote:
> Hi ,
>
> How are strings ("-173.66") converted to money type in Sequel?
> Silly question, is money type the best type to use for money when large
> amounts may be involved?
> A search of all records in the mail list does not turn up any references
> to m
On Aug 20, 8:59 am, Jeremy Evans wrote:
> On Aug 20, 6:18 am, Simon Arnaud wrote:
> > It would be nice if the drop_column statements for the sqlite adapter
> > could be aggregated until really needed, to drop all the columns at
> > once. However, I understand it's not
On Aug 20, 9:17 am, Jeremy Evans wrote:
> Fixing would require significant refactoring. The way it works
> currently is that all alter_table SQL statements are produced by the
> generator first, and afterward each of the SQL strings returned by the
> generator is executed on the
On Aug 20, 12:10 pm, Tal wrote:
> I've got 3 models that are extremely similar except for a few small
> differences. I was thinking the easiest way to get the methods i
> wanted working would be to make them subclasses. I’m not sure how to
> appropriately set the tables for the sub classes.
>
> W
On Aug 20, 4:31 pm, Paul F Fraser wrote:
> Jeremy Evans wrote:
> > On Aug 20, 7:16 am, Paul F Fraser wrote:
>
> >> Hi ,
>
> >> How are strings ("-173.66") converted to money type in Sequel?
> >> Silly question, is money type the best type to u
On Aug 20, 11:09 pm, Paul F Fraser wrote:
> Works well, but how is numeric precision and scale specified in
> create_table.
:size=>[10,2]
> DB.create_table :bank_statements do
> primary_key :id
> String :acct_code
> date :date
> numeric :amount :precision =>10, :scale =>2 ??
On Aug 21, 6:19 am, tooky wrote:
> Hi
>
> Has anybody used sequel with stored procedures that return multiple
> result sets (with mysql)?
>
> It seems to work to an extent, in that it returns all the data, but it
> returns a single array with all the results sets concatenated. Is
> there a way to
On Aug 18, 8:43 am, Jeremy Evans wrote:
> You'd probably want to make it a real plugin, though.
Done:
http://github.com/jeremyevans/sequel/commit/96f08b9ede25ee776b2f79c15600b79874d89918
Jeremy
--~--~-~--~~~---~--~~
You received this message because
On Aug 25, 5:05 pm, Aman Gupta wrote:
> after_update hooks are only invoked when you use Model#update, not
> Dataset#update. There's no way to know which model instances were affected
> by a dataset update.
Aman is correct. If you want the after_update hooks run, you need to
do:
Post.filter(
On Aug 26, 9:10 am, Christer Nilsson
wrote:
> This is taken from the Ruby DBI documentation:
>
> To create the stored procedure, run a query like the following.
>
> create procedure testproc as select * from testtable
>
> To exceute the stored procedure from an SQL Relay program, ue code
>
On Aug 26, 2:34 pm, Jeremy Evans wrote:
> You'll have to be using the JDBC adapter (and therefore JRuby), since
> that's the only adapter that supports both SQL Server and stored
> procedures. But it should be something like:
>
> row1, row2, row3 = DB.dataset.call
On Aug 26, 10:40 am, Adrian Madrid wrote:
> So I finally finished it. Here it is in all its
> glory:http://github.com/aemadrid/sequel_orderable
>
> It is not super pretty but it does its job. I updated Aman's original plugin
> to the new plugin system and added a couple of exceptions for
> movin
On Aug 27, 12:43 am, Shawn wrote:
> Hi Jeremy,
>
> Have you done any unit testing on Sequel models using mock objects
> instead of real database objects? Is there support for that in
> Sequel? Otherwise, have you created or seen any code to extend a
> standard Sequel model to provide such suppo
On Aug 27, 7:22 am, felixaa wrote:
> Hello.
> I have a problem with this code:
>
> DB = Sequel.sqlite("/Users/elusuario/Database.db")
> .
> .
> #This code in a loop
> items= DB[:items]
> items_resul = items[:isbn => isbn]
> .
> .
> One column in "items" has numbers from -500 to 50 but is
On Aug 27, 9:14 am, felixaa wrote:
> Thanks Jeremy
>
> I don´t want to create a new type, just disable casting in a query.
> This method working for me:
>
> DB = Sequel.sqlite("/Users/elusuario/Database.db")
>
> DB[:item].select(:releasedate.cast(String)).map do |row|
>
> .
> .
> But here is the
On Aug 27, 9:24 am, felixaa wrote:
> Hi Again
> I have this ..
>
> DB = Sequel.sqlite("/Users/elusuario/Database.db")
>
> items= DB[:items]
>
> ##And insert one row ...
>
> i_pk = items.insert(:ent => 3, :opt => 1, :title => "Test")
>
> ##But I have to set field :uud to primary key (i_pk) with:
On Aug 27, 4:27 pm, Xavier Lange wrote:
> Is there a way to set the primary key of a model's instance when using
> new/create?
>
> I would like to do
> Role.new(:user_id => 10, :survey_id => 100)
> [:user_id,:survey_id] is a composite key. It raises "Sequel::Error:
> method user_id= doesn't exist
On Aug 27, 4:11 pm, ChilliCoder wrote:
> Hi list,
>
> I'm working with Sequel in Ruby 1.8.6 and MS SQL Server 2000 and now I
> face a problem.
>
> The database I'm accesing has collation set to Latin1 with case
> sensitive and the tables are named on lowercase so when Sequel
> generates SQL state
On Aug 28, 10:29 am, Simon Arnaud wrote:
> Hi
>
> You might want to always format the date you record with strftime. I
> don't think relying on Date_to_s is wise, as it might be redefined.
>
> I, for example, display dates in french in Gtk widgets. To avoid
> calling a Date::to_s_fr on each date,
On Aug 28, 5:32 pm, Clive Crous wrote:
> 2009/8/29 Jeremy Evans :
>
> > However, in general, if you modify methods that Sequel uses that are
> > defined by ruby, and you change their behavior, you should expect to
> > have problems.
>
> I mostly agree with this ho
Slides from my presentation at Lone Star Ruby Conference 2009 are now
up at
http://sequel.rubyforge.org/static/lsrc2009_presentation/sequel-lsrc2009.html.
Jeremy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sequ
On Aug 29, 2:45 pm, Steve Tooke wrote:
> Is there anyway we could pass an option to the dataset that would allow us
> to return as an array of array instead of the default behaviour? I'm happy
> to work up a patch or a plugin if something like that would be likely to be
> accepted. Any pointers o
The master branch is now the release candidate for 3.4.0. I plan on
releasing 3.4.0 on Wednesday or Thursday (the 2nd or 3rd). Please
test the master branch with your apps and notify me of any breakage.
Thanks,
Jeremy
--~--~-~--~~~---~--~~
You received this messa
On Aug 31, 12:20 pm, None wrote:
> I have a db table that dumps to this:
>
> Class.new(Sequel::Migration) do
> def up
> create_table(:foo) do
> primary_key :someId
> column :fk, "int(11)", :null=>false
> column :other_fk, "int(11)", :null=>false
> column :type, "enum
On Aug 31, 3:21 pm, David Lee wrote:
> This is mostly a documentation issue, but I'm hoping for consistent
> terminology to differentiate between dataset methods that stack/merge/
> join options unto previous options, and those that replace previous
> options.
>
> For example, multiple calls to D
On Aug 31, 8:34 pm, daniel_spaniel wrote:
> Hi
> I am trying to eager load an association which is linked by composite
> key. Lets say I have a models like these.
>
> DB_DEMO.create_table! :dudes do
> Integer :'kid - date'
> Integer :'kid - time'
> Integer :'kid - user'
> String :'name
On Aug 31, 11:00 pm, daniel_spaniel wrote:
> I tried your suggestions ( added graph_only_conditions, no dice ..
> here is result sequel for the
> Horse.eager_graph(:dude).first ( same result as with
> Horses.eager_graph(:dude).limit(1).all.first )
Horse.eager_graph(:dude).first won't do what
On Sep 1, 9:24 am, daniel_spaniel wrote:
> Hi J
> Here is the pastie.
> http://pastie.org/601790
>
> I think if I only understood how to get the graph_conditions to be
> applied .. ( the ones you suggested are the correct ones ) when I use
> eager_graph, this would work, but I am not sure why
On Sep 1, 8:49 am, Joel VanderWerf wrote:
> This patch preserves more of the information carried by exceptions that
> bubble up from particular database libraries and are handled by sequel,
> so that you don't have to parse and match message strings.
>
> The basic idea, abstracted from Sequel, is
On Sep 2, 5:09 am, Watchdog6241 wrote:
> Hi
> Can you help on a hello world sequel, I'm ok calling a stored
> procedure and passing in a parameter(s), but how do I get return
> parameters e.g from the below example
>
> (MYSQL 5.1x)
>
> CREATE DEFINER = 'root'@'localhost' PROCEDURE `usp_get`(
>
Sequel 3.4.0 has been released and should be available on the gem
mirrors. The 3.4.0 release adds numerous improvements:
New Plugins
---
* A nested_attributes plugin was added allowing you to modify
associated objects directly through a model object, similar to
ActiveRecord's Nested
On Sep 2, 11:21 am, Joel VanderWerf wrote:
> Jeremy Evans wrote:
> > * Database#<< now always returns nil. Before, the return value was
> > adapter dependent.
>
> I was going to ask why not return self, like other #<< in ruby, but then
> I ran into this wi
On Sep 2, 11:36 am, Joel VanderWerf wrote:
> Joel VanderWerf wrote:
> > Jeremy Evans wrote:
> >> * Database#<< now always returns nil. Before, the return value was
> >> adapter dependent.
>
> > I was going to ask why not return self, like other #<
On Sep 2, 2:45 pm, Clive Crous wrote:
> 2009/9/2 Jeremy Evans :
>
> > DB << "create table t (a text, b text)" << "insert into t values
> > ('a', 'b')"
>
> > I think that makes the code harder to read. If you
On Sep 2, 11:43 pm, Clive Crous wrote:
> 2009/9/3 Jeremy Evans :
>
> > Hmm, could you give an example of this with Sequel? In general, most
> > of the database adapters don't support multiple SQL statements inside
> > a single call. The native MySQL adapter is an
On Sep 3, 10:45 am, Joel VanderWerf wrote:
> I was thinking in terms of ruby style rather than how queries are sent
> to the database, but I can't really come up with any strong sylistic
> reasons, other that "that's how most[1] other #<< methods work", which
> is pretty weak!
>
> Maybe that argu
On Sep 3, 11:06 am, Tal wrote:
> Sorry for being such a novice about this. But i'm not sure how to
> setup timestamps using the new plugin inside of a model?
The timestamps plugin is designed so that if you want, you can use it
for all models easily:
Sequel::Model.plugin :timestamps
Then, as
On Aug 31, 1:47 pm, Jeremy Evans wrote:
> There's two ways to handle this:
>
> 1) Convert unparseable column defaults to nil, instead of using
> the .lit hack (which apparently doesn't work most of the time for
> MySQL).
>
> 2) Handle the enum type in column_schem
On Sep 3, 4:09 pm, Iñaki Baz Castillo wrote:
> Hi, from a MySQL table I get a blob field (with attribute "BINARY"). But in
> fact it's a string (a XML document).
>
> To extract the content I use #to_s and it seems to work, but I don't see it
> documented.
>
> Am I right?
It should be returned as
On Sep 4, 9:06 am, Iñaki Baz Castillo wrote:
> Summary:
>
> Sequel Sequel(prep. stament) DataMapper
>
> ruby1.8 cpu usage: 85% 65% 92%
> mysqld cpu usage: 11% 30% 5%
> ruby1.8 mem us
On Sep 4, 11:39 am, Iñaki Baz Castillo wrote:
> El Viernes, 4 de Septiembre de 2009, Jeremy Evans escribió:
>
> > There are various ways you can optimize the Sequel code. Generally,
> > for something that's very performance sensitive, you are going to want
> > t
On Sep 4, 12:38 pm, Tal wrote:
> Using plugin :timestamp, :create => :created_at, :update
> => :modified_at
>
> the update hook works just fine but it never puts in the created_at
> value. Cant figure out why, I even tried :force => true.
Are you overriding before_create in your model and not ca
On Sep 4, 2:14 pm, Iñaki Baz Castillo wrote:
> If I create a MySQL prepared stament, use it and latter restart MySQL then
> Sequel receives this error for the next query using the prepared stament:
>
> !! Unexpected error while processing request: Mysql::Error: Unknown prepared
> statement ha
On Sep 4, 2:41 pm, Iñaki Baz Castillo wrote:
> Ok, I've added a "begin, rescue" in the Rack #call method so now I see the
> exception. There I see Sequel::DatabaseConnectionError.
>
> However, I still wonder how to detect that a prepared stament has been lost
> due to a DB server restart...
>
> T
On Sep 4, 3:37 pm, Iñaki Baz Castillo wrote:
> El Sábado, 5 de Septiembre de 2009, Iñaki Baz Castillo escribió:
>
>
>
> > Then I restart MySQL. I've configured a "begin - raise" so if a Sequel DB
> > error occurs, I call again DB.set. However I reply "500 Internal Error" to
> > the current requ
On Sep 1, 12:29 pm, Joel VanderWerf wrote:
> Jeremy Evans wrote:
> > We could expand Sequel::Error to store the underlying exception class
> > (if any):
>
> > class Sequel::Error
> > attr_accessor :underlying_exception
> > end
>
> > That way a
On Sep 4, 4:06 pm, Iñaki Baz Castillo wrote:
> El Sábado, 5 de Septiembre de 2009, Iñaki Baz Castillo escribió:
> > El Sábado, 5 de Septiembre de 2009, Iñaki Baz Castillo escribió:
> > > El Sábado, 5 de Septiembre de 2009, Jeremy Evans escribió:
> > > > The pa
On Sep 4, 4:46 pm, Iñaki Baz Castillo wrote:
> Humm, note what happens to me when trying to repeat your test:
>
> # ruby -I lib /usr/bin/sequel -E mysql://root:xx...@localhost/xxx
> Error: Sequel::AdapterNotFound: Could not load mysql adapter:
> require 'mysql' did not define Mysql::CLIENT_
On Sep 4, 5:18 pm, Iñaki Baz Castillo wrote:
> El Sábado, 5 de Septiembre de 2009, Jeremy Evans escribió:
> > The difference could be due to the fact that I just committed an
> > exception related change to the master branch. Please try with the
> > master branch and let
On Sep 4, 8:07 pm, Scott LaBounty wrote:
> I'm having trouble adding a Boolean column to a sqlite database. Here's what
> I have:
>
> def up
> alter_table(:deployments) do
> add_column :fixed_date, Boolean
> end
> end
>
> It looks like (and I remember Jeremy sa
On Sep 8, 1:28 am, Iñaki Baz Castillo wrote:
> Hi, when using a prepared statement (using MySQL adapter) containing
> two or more variables, Sequel does a "SET" query for each variable,
> this is:
>
> #prepare:
> PREPARE ps FROM "SELECT etag FROM storage WHERE username = ? AND
> domain = ?"
On Sep 8, 2:59 pm, Iñaki Baz Castillo wrote:
> 2009/9/8 Jeremy Evans :
> > I tried a variant that set that variables and executed the prepared
> > statement in a single call to _execute, but it failed some of the
> > integration tests. It looked to be safe for selects, b
On Sep 8, 3:58 pm, Iñaki Baz Castillo wrote:
> El Miércoles, 9 de Septiembre de 2009, Jeremy Evans escribió:
>
> > On Sep 8, 2:59 pm, Iñaki Baz Castillo wrote:
> > > 2009/9/8 Jeremy Evans :
> > > > I tried a variant that set that variables and executed the prepa
On Sep 9, 5:51 am, paddor wrote:
> Hello
>
> I have to insert many datasets into a PostgreSQL table. The table is
> partitioned and uses a trigger to redirect an inserted record to the
> correct table behind it. It works without an ORM.
>
> I use a model for the table.
>
> Both ActiveRecord and S
On Sep 9, 8:04 am, Jeremy Evans wrote:
> This is a bug. Dataset#insert_select should return nil if
> disable_insert_returning is used. I'll push a change to github later
> today to take care of this.
Fixed:
http://github.com/jeremyevans/sequel/commit/c33499bfa9eeae652941adf867
On Sep 8, 2:38 pm, Joel VanderWerf wrote:
> Jeremy Evans wrote:
> >http://github.com/jeremyevans/sequel/commit/53a1428c4e3e37369cb811640...
>
> Looks good. The only thing I would add is an inspect method:
>
> module Sequel
> class Error < ::Stand
701 - 800 of 4938 matches
Mail list logo