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
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
65aa1684
Commit
65aa1684
authored
9 years ago
by
João Victor Risso
Browse files
Options
Downloads
Patches
Plain Diff
Add DatabaseStatements module
Signed-off-by:
João Victor Risso
<
jvtr12@c3sl.ufpr.br
>
parent
28e1a353
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/active_record/connection_adapters/monetdb/database_statements.rb
+71
-0
71 additions, 0 deletions
...record/connection_adapters/monetdb/database_statements.rb
with
71 additions
and
0 deletions
lib/active_record/connection_adapters/monetdb/database_statements.rb
0 → 100644
+
71
−
0
View file @
65aa1684
module
ActiveRecord
module
ConnectionAdapters
module
MonetDB
module
DatabaseStatements
# Returns a single value from a record
def
select_value
(
arel
,
name
=
nil
,
binds
=
[])
end
# Returns an array of the values of the first column in a select:
# select_values("SELECT id FROM companies LIMIT 3") => [1,2,3]
def
select_values
(
arel
,
name
=
nil
)
end
# Returns an array of arrays containing the field values.
# Order is the same as that returned by +columns+.
def
select_rows
(
sql
,
name
=
nil
,
binds
=
[])
end
# Executes the SQL statement in the context of this connection.
def
execute
(
sql
,
name
=
nil
)
end
# Executes +sql+ statement in the context of this connection using
# +binds+ as the bind substitutes. +name+ is logged along with
# the executed +sql+ statement.
def
exec_query
(
sql
,
name
=
'SQL'
,
binds
=
[])
end
# Executes insert +sql+ statement in the context of this connection using
# +binds+ as the bind substitutes. +name+ is logged along with
# the executed +sql+ statement.
def
exec_insert
(
sql
,
name
,
binds
,
pk
=
nil
,
sequence_name
=
nil
)
end
# Executes delete +sql+ statement in the context of this connection using
# +binds+ as the bind substitutes. +name+ is logged along with
# the executed +sql+ statement.
def
exec_delete
(
sql
,
name
,
binds
)
exec_query
(
sql
,
name
,
binds
)
end
# Executes the truncate statement.
def
truncate
(
table_name
,
name
=
nil
)
raise
NotImplementedError
end
# Executes update +sql+ statement in the context of this connection using
# +binds+ as the bind substitutes. +name+ is logged along with
# the executed +sql+ statement.
def
exec_update
(
sql
,
name
,
binds
)
exec_query
(
sql
,
name
,
binds
)
end
protected
def
insert_sql
(
sql
,
name
=
nil
,
pk
=
nil
,
id_value
=
nil
,
sequence_name
=
nil
)
end
def
update_sql
(
sql
,
name
=
nil
)
end
def
delete_sql
(
sql
,
name
=
nil
)
end
def
sql_for_insert
(
sql
,
pk
,
id_value
,
sequence_name
,
binds
)
end
end
end
end
end
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