
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Ruby port of Perl's MySQL::Partition
require 'mysql_partition'
# List Partition
partition = MysqlPartition::SqlMaker.new(type: :list, table: "test", expression: "event_id")
partition.create_partitions("p1" => 1)
#=> ALTER TABLE test PARTITION BY LIST (event_id) (PARTITION p1 VALUES IN (1))
partition.add_partitions("p2" => "2, 3")
#=> ALTER TABLE test ADD PARTITION (PARTITION p2 VALUES IN (2, 3))
partition.drop_partitions("p1")
#=> ALTER TABLE test DROP PARTITION p1
# Range Partition
partition = MysqlPartition::SqlMaker.new(type: :range, table: "test2", expression: "created_at")
partition.create_partitions('p20100101' => '2010-01-01')
#=> ALTER TABLE test2 PARTITION BY RANGE (created_at) (PARTITION p20100101 VALUES LESS THAN ('2010-01-01'))
partition.add_partitions(
'p20110101' => '2011-01-01',
'p20120101' => '2012-01-01',
)
#=> ALTER TABLE test2 ADD PARTITION (PARTITION p20110101 VALUES LESS THAN ('2011-01-01'), PARTITION p20120101 VALUES LESS THAN ('2012-01-01'))
partition.drop_partitions('p20100101')
#=> ALTER TABLE test2 DROP PARTITION p20100101
Add this line to your application's Gemfile:
gem 'mysql_partition'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mysql_partition
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that mysql_partition demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.