#18 new
Nate Wiger

delete_all throws an exception on simple_record 1.1.72 with aws 2.3.5 gem

Reported by Nate Wiger | May 2nd, 2010 @ 07:38 AM

On the newest simple_record / aws combination available, a delete_all raises an exception. Example class:

    class User < SimpleRecord::Base
      has_strings :username, :password
      has_ints :age
      has_dates :dob
      has_booleans :is_active
    end

    User.destroy_all

The exception:

    SimpleRecord.establish_connection with options: {:connection_mode=>:single}
    New Aws::SdbInterface using single-connection mode
    Opening new HTTPS connection to sdb.amazonaws.com:443
    ##### Aws::SdbInterface returned an error: 400 Bad Request
    <?xml version="1.0"?>
    <Response><Errors><Error><Code>InvalidQueryExpression</Code><Message>The specified query expression syntax is not valid.</Message><BoxUsage>0.0000137200</BoxUsage></Error></Errors><RequestID>0c82b620-81a5-a64d-0d74-b052120c9350</RequestID></Response> #####
    ##### Aws::SdbInterface request: sdb.amazonaws.com:443/?AWSAccessKeyId=0WQ5SD09D57CNTRV2KG2&Action=Select&SelectExpression=SELECT%20%2A%20FROM%20%60users%60%20WHERE%20%28%29&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2010-05-02T14%3A34%3A12.000Z&Version=2009-04-15&Signature=U1cWPlWCALcHf3Zgv1kKoF9OsChmT5UDHe4vmTWx8lA%3D ####
    /Users/nwiger/.rvm/gems/ruby-1.9.2-head/gems/aws-2.3.5/lib/awsbase/right_awsbase.rb:684:in `request_info_impl': InvalidQueryExpression: The specified query expression syntax is not valid. (Aws::AwsError)
    REQUEST(sdb.amazonaws.com:443/?AWSAccessKeyId=0WQ5SD09D57CNTRV2KG2&Action=Select&SelectExpression=SELECT%20%2A%20FROM%20%60users%60%20WHERE%20%28%29&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2010-05-02T14%3A34%3A12.000Z&Version=2009-04-15&Signature=U1cWPlWCALcHf3Zgv1kKoF9OsChmT5UDHe4vmTWx8lA%3D)
        from /Users/nwiger/.rvm/gems/ruby-1.9.2-head/gems/aws-2.3.5/lib/awsbase/right_awsbase.rb:450:in `request_info2'
        from /Users/nwiger/.rvm/gems/ruby-1.9.2-head/gems/aws-2.3.5/lib/sdb/right_sdb_interface.rb:94:in `request_info'
        from /Users/nwiger/.rvm/gems/ruby-1.9.2-head/gems/aws-2.3.5/lib/sdb/right_sdb_interface.rb:629:in `select'
        from /Users/nwiger/.rvm/gems/ruby-1.9.2-head/gems/aws-2.3.5/lib/sdb/active_sdb.rb:378:in `sql_select'
        from /Users/nwiger/.rvm/gems/ruby-1.9.2-head/gems/aws-2.3.5/lib/sdb/active_sdb.rb:352:in `select_from_ids'
        from /Users/nwiger/.rvm/gems/ruby-1.9.2-head/gems/aws-2.3.5/lib/sdb/active_sdb.rb:275:in `find'
        from /Users/nwiger/.rvm/gems/ruby-1.9.2-head/gems/simple_record-1.1.72/lib/simple_record.rb:666:in `find'
        from /Users/nwiger/.rvm/gems/ruby-1.9.2-head/gems/simple_record-1.1.72/lib/simple_record.rb:506:in `destroy_all'
        from sr.rb:19:in `<main>'

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A drop in replacement for ActiveRecord for Amazon SimpleDB.

Code hosted at http://github.com/appoxy/simple_record

Shared Ticket Bins

People watching this ticket

Pages