maiqingqiang / go-orm-helper

🚀🚀 A GoLand plugin that automatically provides database field completion, tags, and generates Structs for writing ORM code. Supports: Gorm、Xorm、Beego、GoFrame, etc. ⭐️ Star to support our work!一个为了让你在 Goland 上写 ORM 能自动补全数据库字段、Tag、生成Struct 的插件。支持:Gorm、Xorm、Beego、GoFrame...)请给个 ⭐️Star 支持我们的工作吧!
GNU General Public License v3.0
161 stars 9 forks source link

[qykings@m1pro 21:40:17~/tmp]cat errlog #14

Closed qywangweiqang closed 10 months ago

qywangweiqang commented 10 months ago

[qykings@m1pro 21:40:17~/tmp]cat errlog java.lang.ClassCastException: class com.alibaba.druid.sql.ast.statement.SQLAlterTableStatement cannot be cast to class com.alibaba.druid.sql.ast.statement.SQLCreateTableStatement (com.alibaba.druid.sql.ast.statement.SQLAlterTableStatement and com.alibaba.druid.sql.ast.statement.SQLCreateTableStatement are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4d65fa33) at com.github.maiqingqiang.goormhelper.sql2struct.impl.SQL2Struct.singleConvert(SQL2Struct.java:76) at com.github.maiqingqiang.goormhelper.sql2struct.impl.SQL2Struct.convert(SQL2Struct.java:68) at com.github.maiqingqiang.goormhelper.actions.SQL2StructAction.lambda$actionPerformed$0(SQL2StructAction.java:52) at com.intellij.openapi.command.WriteCommandAction.lambda$runWriteCommandAction$4(WriteCommandAction.java:360) at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:149) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:992) at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:147) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:184) at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:156) at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:123) at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:360) at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:348) at com.github.maiqingqiang.goormhelper.actions.SQL2StructAction.actionPerformed(SQL2StructAction.java:47) at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:339) at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:313) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:362) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:313) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$performAction$5(ActionMenuItem.java:300) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:226) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.java:293) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$new$0(ActionMenuItem.java:68) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$4(ActionMenuItem.java:115) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:115) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:526) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:558) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6657) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385) at java.desktop/java.awt.Component.processEvent(Component.java:6422) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4954) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4581) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4522) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2808) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:794) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:766) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:764) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:763) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:690) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:638) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:592) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:997) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:997) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

maiqingqiang commented 10 months ago
ALTER DATABASE assdb CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
ALTER TABLE user MODIFY name VARCHAR(30) CHARACTER SET utf8mb4;

老哥,你之前发的 sql 不是一个 create table sql,这个是修改表的 sql,这种 sql 是没法转 struct 的

qywangweiqang commented 10 months ago

好 

qykings @.***

 

------------------ 原始邮件 ------------------ 发件人: "John @.>; 发送时间: 2023年12月29日(星期五) 下午5:41 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [maiqingqiang/go-orm-helper] @.*** 21:40:17~/tmp]cat errlog (Issue #14)

ALTER DATABASE assdb CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; ALTER TABLE user MODIFY name VARCHAR(30) CHARACTER SET utf8mb4;
老哥,你之前发的 sql 不是一个 create table sql,这个是修改表的 sql,这种 sql 是没法转 struct 的

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>