rossoc 0.9.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c1044e8d160f0b6790e4bdf78ab4d638ed82e32cb50d3841946a5ac56110981
4
- data.tar.gz: fe607e717eb85c61496d9b2727e26d3fa2f35afc503ced70164f22e032e9dc49
3
+ metadata.gz: c29b2c3dbca140963ea70825f16bbdb73d02b9ff403c450155b5987dddeb2a20
4
+ data.tar.gz: 5fe4cd24fc731c4b66b19486daba7e036a405d468e196bf7d44d24d5e0762f59
5
5
  SHA512:
6
- metadata.gz: c28e9e8620c54f03803d9f44ca35809eaff57ba4b3d58864d514631f6455034ebf17d1735b55357e26399c6ef59b0bfaf7fee2e13fdc9dcf2d80d5d8c48f2bcf
7
- data.tar.gz: e2a0cb26b8e45fa2ce99761431ef0c26c285a9918e3463cc577d1003fa90a59d38b593b0382aacd59af828928847d6f1b1a0f7c9d036d0017c73a0fc7639a1d8
6
+ metadata.gz: 4013e2b6dc9e9b33d974ddccfa59eaff2a21e56ee10bcfdcea5923e1a8b9d4335a4a48f721f4e0717a83f975d5ce4b26c7b98bd57f39339dc91a949782558ed6
7
+ data.tar.gz: 6665c6f97487f66d7591ec0a9b9ed66e6f17a4b5ed67a5474583cf4375dec6a5854ef3b3d9048c16b55d7608a54140e88f49d4af4eac67111367bc4cc00b44d6
data/README.base.md CHANGED
@@ -7,11 +7,13 @@
7
7
 
8
8
  <!-- [ja] -->
9
9
  # rossoc
10
+ [![Gem Version](https://badge.fury.io/rb/rossoc.svg)](https://badge.fury.io/rb/rossoc)
10
11
  rossoc はSQLからコードを生成する実験的なプロジェクトです。
11
12
  SQLを mruby, mruby/c, と Arduino に変換します。
12
13
 
13
14
  <!-- [en] -->
14
15
  # rossoc
16
+ [![Gem Version](https://badge.fury.io/rb/rossoc.svg)](https://badge.fury.io/rb/rossoc)
15
17
  rossoc is an experimental project to generate code from sql.
16
18
  Converts sql to mruby, mruby/c, or Arduino source code.
17
19
 
data/README.ja.md CHANGED
@@ -1,6 +1,7 @@
1
1
 
2
2
 
3
3
  # rossoc
4
+ [![Gem Version](https://badge.fury.io/rb/rossoc.svg)](https://badge.fury.io/rb/rossoc)
4
5
  rossoc はSQLからコードを生成する実験的なプロジェクトです。
5
6
  SQLを mruby, mruby/c, と Arduino に変換します。
6
7
 
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
 
2
2
 
3
3
  # rossoc
4
+ [![Gem Version](https://badge.fury.io/rb/rossoc.svg)](https://badge.fury.io/rb/rossoc)
4
5
  rossoc is an experimental project to generate code from sql.
5
6
  Converts sql to mruby, mruby/c, or Arduino source code.
6
7
 
@@ -45,6 +45,8 @@ module Rossoc
45
45
  parser = SQLParser::Parser.new
46
46
  @ast = parser.scan_str(sql)
47
47
  rescue Racc::ParseError => e
48
+ warn sql
49
+ warn "#{' ' * parser.ss.pos}^"
48
50
  raise FrontendError, e
49
51
  end
50
52
 
@@ -58,8 +60,12 @@ module Rossoc
58
60
  @in_pins.add(name)
59
61
  @out_pins.add(name)
60
62
  end
63
+ rescue FrontendError => e
64
+ # サポート外のカラムを指定したとき
65
+ raise FrontendError, e
61
66
  rescue StandardError
62
- raise FrontendError, 'unsupported column.'
67
+ # カラムにワイルドカードを指定したとき
68
+ raise FrontendError, 'unsupported wildcard column.'
63
69
  end
64
70
 
65
71
  def check_tables
@@ -67,8 +73,8 @@ module Rossoc
67
73
  tables.each do |table|
68
74
  @table = table.name
69
75
  end
70
- rescue e
71
- raise e
76
+ rescue StandardError
77
+ raise FrontendError, 'unsupported table(s).'
72
78
  end
73
79
 
74
80
  def check_condition
@@ -78,8 +84,8 @@ module Rossoc
78
84
  else
79
85
  @ast.query_expression.table_expression.where_clause.search_condition
80
86
  end
81
- rescue e
82
- raise e
87
+ rescue StandardError
88
+ raise FrontendError, 'unsupported condition(s).'
83
89
  end
84
90
 
85
91
  if condition.nil?
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.8.0
3
+ # This file is automatically generated by Racc 1.7.3
4
4
  # from Racc grammar file "parser.racc".
5
5
  #
6
6
 
@@ -9,6 +9,9 @@ class SQLParser::Parser
9
9
  option
10
10
  ignorecase
11
11
 
12
+ inner
13
+ attr_reader :ss
14
+
12
15
  macro
13
16
  DIGIT [0-9]
14
17
  UINT {DIGIT}+
@@ -298,4 +298,5 @@ class SQLParser::Parser < Racc::Parser
298
298
  token
299
299
  end # def _next_token
300
300
 
301
+ attr_reader :ss
301
302
  end # class
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rossoc
4
- VERSION = '0.9.0'
4
+ VERSION = '1.0.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rossoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - arthur87
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-05 00:00:00.000000000 Z
11
+ date: 2025-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -94,7 +94,7 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- description: Convert sql to mruby mruby/c Common I/O API
97
+ description: Converts sql to mruby, mruby/c, or Arduino source code.
98
98
  email:
99
99
  - arthur87@users.noreply.github.com
100
100
  executables:
@@ -128,7 +128,8 @@ files:
128
128
  - lib/rossoc/views/mruby.erb
129
129
  - sig/rossoc.rbs
130
130
  homepage: https://github.com/arthur87/rossoc
131
- licenses: []
131
+ licenses:
132
+ - MIT
132
133
  metadata:
133
134
  homepage_uri: https://github.com/arthur87/rossoc
134
135
  source_code_uri: https://github.com/arthur87/rossoc
@@ -151,5 +152,5 @@ requirements: []
151
152
  rubygems_version: 3.5.11
152
153
  signing_key:
153
154
  specification_version: 4
154
- summary: Convert sql to mruby mruby/c Common I/O API
155
+ summary: Converts sql to mruby, mruby/c, or Arduino source code.
155
156
  test_files: []