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
011ca675
Commit
011ca675
authored
9 years ago
by
João Victor Risso
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup MonetDBAdapter::SchemaCreation class
Signed-off-by:
João Victor Risso
<
jvtr12@inf.ufpr.br
>
parent
23c361ed
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/schema_creation.rb
+4
-75
4 additions, 75 deletions
...ive_record/connection_adapters/monetdb/schema_creation.rb
with
4 additions
and
75 deletions
lib/active_record/connection_adapters/monetdb/schema_creation.rb
+
4
−
75
View file @
011ca675
...
@@ -2,78 +2,7 @@ module ActiveRecord
...
@@ -2,78 +2,7 @@ module ActiveRecord
module
ConnectionAdapters
module
ConnectionAdapters
module
MonetDB
module
MonetDB
class
SchemaCreation
<
AbstractAdapter
::
SchemaCreation
class
SchemaCreation
<
AbstractAdapter
::
SchemaCreation
def
accept
(
o
)
end
# class SchemaCreation
end
end
# module MonetDB
end
# module ConnectionAdapters
def
visit_AddColumn
(
o
)
end
# module ActiveRecord
end
private
def
visit_AlterTable
(
o
)
end
def
visit_ColumnDefinition
(
o
)
sql
=
super
if
o
.
primary_key?
&&
o
.
type
!=
:primary_key
sql
<<
" PRIMARY KEY "
add_column_options!
(
sql
,
column_options
(
o
))
end
sql
end
def
visit_TableDefinition
(
o
)
end
def
visit_AddForeignKey
(
o
)
end
def
visit_DropForeignKey
(
o
)
end
def
column_options
(
o
)
end
def
quote_column_name
(
name
)
end
def
quote_table_name
(
name
)
end
def
type_to_sql
(
type
,
limit
,
precision
,
scale
)
end
def
add_column_options!
(
sql
,
options
)
if
options
[
:array
]
||
options
[
:column
].
try
(
:array
)
sql
<<
'[]'
end
column
=
options
.
fetch
(
:column
)
{
return
super
}
if
column
.
type
==
:uuid
&&
options
[
:default
]
=~
/\(\)/
sql
<<
" DEFAULT
#{
options
[
:default
]
}
"
else
super
end
end
def
quote_value
(
value
,
column
)
end
def
options_include_default?
(
options
)
end
def
action_sql
(
action
,
dependency
)
end
def
type_for_column
(
column
)
if
column
.
array
@conn
.
lookup_cast_type
(
"
#{
column
.
sql_type
}
[]"
)
else
super
end
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