clevic 0.14.1 → 0.14.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/lib/clevic/model_column.rb +14 -58
- data/lib/clevic/qt/ui/browser_ui.rb +1 -1
- data/lib/clevic/qt/ui/search_dialog_ui.rb +1 -1
- data/lib/clevic/version.rb +1 -1
- metadata +7 -7
data/History.txt
CHANGED
data/lib/clevic/model_column.rb
CHANGED
@@ -3,13 +3,22 @@ Field metadata class. Includes information for type, reflections etc.
|
|
3
3
|
|
4
4
|
Also, it eases the migration from AR to Sequel, which returns metadata as
|
5
5
|
a hash instead of a class.
|
6
|
+
|
7
|
+
Basically it stores a bunch of Sequel and AR specific values, and
|
8
|
+
occasionally needs to tweak one.
|
6
9
|
=end
|
7
10
|
|
8
|
-
|
9
|
-
# these are from AR
|
10
|
-
attr_accessor :primary, :scale, :sql_type, :name, :precision, :default, :type, :meta
|
11
|
+
require 'ostruct'
|
11
12
|
|
12
|
-
|
13
|
+
class ModelColumn < OpenStruct
|
14
|
+
def initialize( name, hash )
|
15
|
+
super(hash)
|
16
|
+
|
17
|
+
# must be after hash so it takes precedence
|
18
|
+
@name = name
|
19
|
+
end
|
20
|
+
|
21
|
+
attr_reader :name
|
13
22
|
|
14
23
|
# if it's not here, it's probably from Sequel, so figure it out from
|
15
24
|
# the db_type
|
@@ -21,60 +30,7 @@ class ModelColumn
|
|
21
30
|
@limit
|
22
31
|
end
|
23
32
|
|
24
|
-
|
25
|
-
attr_accessor :ruby_default, :primary_key, :allow_null, :db_type
|
26
|
-
|
27
|
-
# sequel::Model.reflections
|
28
|
-
attr_accessor :key, :eager_block, :type, :eager_grapher, :before_add, :model, :graph_join_type, :class_name, :before_remove, :eager_loader, :uses_composite_keys, :order_eager_graph, :dataset, :cartesian_product_number, :after_add, :cache, :keys, :after_remove, :extend, :graph_conditions, :name, :orig_opts, :after_load, :before_set, :after_set, :reciprocal, :reciprocal_type
|
29
|
-
|
30
|
-
# for many_to_one targets
|
31
|
-
attr_accessor :primary_keys
|
32
|
-
|
33
|
-
# TODO not sure where these are from
|
34
|
-
attr_accessor :order, :class, :conditions
|
35
|
-
|
36
|
-
# new in sequel 3.25.0
|
37
|
-
attr_accessor :block
|
38
|
-
|
39
|
-
# new in sequel 3.30.0
|
40
|
-
attr_accessor :graph_alias_base
|
41
|
-
attr_accessor :qualified_key
|
42
|
-
|
43
|
-
# For Sequel many_to_many
|
44
|
-
attr_accessor :left_key,
|
45
|
-
:left_keys,
|
46
|
-
:right_key,
|
47
|
-
:right_keys,
|
48
|
-
:left_primary_key,
|
49
|
-
:left_primary_keys,
|
50
|
-
:uses_left_composite_keys,
|
51
|
-
:uses_right_composite_keys,
|
52
|
-
:cartesian_product_number,
|
53
|
-
:join_table,
|
54
|
-
:left_key_alias,
|
55
|
-
:graph_join_table_conditions,
|
56
|
-
:graph_join_table_join_type
|
57
|
-
|
58
|
-
# from 3.35.0
|
59
|
-
attr_accessor :graph_keys, :key_method, :primary_key_column, :primary_key_columns
|
60
|
-
|
61
|
-
# added by us
|
62
|
-
attr_accessor :association
|
63
|
-
def association?; association; end
|
64
|
-
|
65
|
-
def initialize( name, hash )
|
66
|
-
@hash = hash
|
67
|
-
@hash.each do |key,value|
|
68
|
-
send( "#{key}=", value )
|
69
|
-
end
|
70
|
-
|
71
|
-
# must be after hash so it takes precedence
|
72
|
-
@name = name
|
73
|
-
end
|
74
|
-
|
75
|
-
def name
|
76
|
-
@name
|
77
|
-
end
|
33
|
+
attr_writer :limit
|
78
34
|
|
79
35
|
def related_class
|
80
36
|
@related_class ||= eval class_name
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
** Form generated from reading ui file 'browser.ui'
|
3
3
|
**
|
4
|
-
** Created: Mon Jan
|
4
|
+
** Created: Mon Jan 31 16:10:23 2011
|
5
5
|
** by: Qt User Interface Compiler version 4.5.1
|
6
6
|
**
|
7
7
|
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
** Form generated from reading ui file 'search_dialog.ui'
|
3
3
|
**
|
4
|
-
** Created: Mon Jan
|
4
|
+
** Created: Mon Jan 31 16:10:23 2011
|
5
5
|
** by: Qt User Interface Compiler version 4.5.1
|
6
6
|
**
|
7
7
|
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
data/lib/clevic/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clevic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fastercsv
|
@@ -226,7 +226,7 @@ dependencies:
|
|
226
226
|
requirements:
|
227
227
|
- - ! '>='
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: 3.
|
229
|
+
version: 3.8.0
|
230
230
|
type: :development
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -234,7 +234,7 @@ dependencies:
|
|
234
234
|
requirements:
|
235
235
|
- - ! '>='
|
236
236
|
- !ruby/object:Gem::Version
|
237
|
-
version: 3.
|
237
|
+
version: 3.8.0
|
238
238
|
description: SQL table GUI with Qt / Java Swing and Sequel
|
239
239
|
email: panic@semiosix.com
|
240
240
|
executables:
|
@@ -404,13 +404,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
404
404
|
version: '0'
|
405
405
|
requirements: []
|
406
406
|
rubyforge_project: clevic
|
407
|
-
rubygems_version: 1.8.
|
407
|
+
rubygems_version: 1.8.24
|
408
408
|
signing_key:
|
409
409
|
specification_version: 3
|
410
410
|
summary: http://clevic.
|
411
411
|
test_files:
|
412
|
+
- test/test_table_searcher.rb
|
412
413
|
- test/test_model_index_extensions.rb
|
413
|
-
- test/test_helper.rb
|
414
414
|
- test/test_table_model.rb
|
415
|
-
- test/
|
415
|
+
- test/test_helper.rb
|
416
416
|
- test/test_cache_table.rb
|