Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
activerecord-monetdb-adapter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simcaq
activerecord-monetdb-adapter
Commits
8c6c4677
Commit
8c6c4677
authored
12 years ago
by
Pavel
Browse files
Options
Downloads
Patches
Plain Diff
Fixed delete() method
parent
c20760d9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
adapter/lib/active_record/connection_adapters/monetdb_adapter.rb
+48
-43
48 additions, 43 deletions
.../lib/active_record/connection_adapters/monetdb_adapter.rb
with
48 additions
and
43 deletions
adapter/lib/active_record/connection_adapters/monetdb_adapter.rb
+
48
−
43
View file @
8c6c4677
...
...
@@ -450,6 +450,11 @@ module ActiveRecord
result
.
last_insert_id
end
def
delete
(
arel
,
name
=
nil
,
binds
=
[])
res
=
super
(
arel
,
name
,
binds
)
res
.
affected_rows
end
# Begins the transaction.
def
begin_db_transaction
hdl
=
execute
(
"START TRANSACTION"
)
...
...
@@ -501,7 +506,7 @@ module ActiveRecord
#=======END=OF=DATABASE=STATEMENTS=========#
protected
# restructure result returned by execute
def
process_hdl
(
hdl
)
result
=
[]
...
...
@@ -536,8 +541,7 @@ module ActiveRecord
# Executes the update statement and returns the number of rows affected.
def
update_sql
(
sql
,
name
=
nil
)
hdl
=
execute
(
sql
,
name
)
# affected_rows = hdl.affected_rows
return
false
hdl
.
affected_rows
end
# Returns the last auto-generated ID from the affected table.
...
...
@@ -549,9 +553,10 @@ module ActiveRecord
# table_name = extract_table_name_from_insertion_query(sql)
# make_sure_pk_works(table_name,name)
hdl
=
execute
(
sql
,
name
)
# last_auto_generated_id = hdl.get_last_auto_generated
_id
hdl
.
last_insert
_id
end
protected
# Some tests insert some tuples with the id values set. In other words, the sequence
# is not used to generate a value for the primary key column named id. When a new tuple
# it to be inserted, where the id value is not set explicitly, a primary key violation will
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment