ObjectiveSQL is an ORM framework in Java based on ActiveRecord pattern

Overview

ObjectiveSQL is an ORM framework in Java based on ActiveRecord pattern, which encourages rapid development and clean, codes with the least, and convention over configuration.

Key Features

  • With one annotation your Class has fully featured capabilities of SQL programming
  • Easy to relational(has_one, has_many and belongs_to) query and paged query
  • Writing SQL expressions(arithmetic, comparison and logical) using Java syntax

Why to choose

  • If your project focuses on data analysis based on relation database, and a lot of arithmetic expressions in SQL statement. ObjectiveSQL will help you write expressions conveniently and safely using Java syntax
  • If you don’t want to write Java codes of database access and various configuration files, ObjectiveSQL's dynamic code generation will help you access the database without coding

Performance(Oracle JMH)

query_perf

Installation

IntelliJ IDEA plugin installation

Preferences/Settings -> Plugins -> Search with "ObjectiveSql" in market -> Install

Maven dependencies

<dependency>
    <groupId>com.github.braisdomgroupId>
    <artifactId>objective-sqlartifactId>
    <version>1.4.6version>
dependency>

<dependency>
  <groupId>com.github.braisdomgroupId>
  <artifactId>objsql-springbootartifactId>
  <version>1.3.4version>
dependency>

Refer to the pom.xml for more configuration

Examples

ObjectiveSQL provides full example for various databases below, You can open it directly with IntelliJ IDEA as a standalone project. In fact, they are not just examples, but also unit tests of ObjectiveSQL in various databases.

If you want to run without configuration, you can try: SQLite

Others: MySQL, Oracle, MS SQL Server, PostgreSQL, Spring Boot

Simple SQL programming without coding

You define just a JavaBean with one annotation

@DomainModel
public class Member {
    private String no;
    
    @Queryable
    private String name;
    private Integer gender;
    private String mobile;
    private String otherInfo;

    @Relation(relationType = RelationType.HAS_MANY)
    private List<Order> orders;
}
Persistence
Member.create(newMember);
Member.create(new Member[]{newMember1, newMember2, newMember3}, false);

Member.update(1L, newMember, true);
Member.update("name = 'Smith => Jackson'", "name = ?", "Alice");

Member.destroy(1L);
Member.destroy("name = ?", "Mary");
Counting and querying
?", 1); Member.queryByPrimaryKey(1); Member.queryFirst("id = ?", 1); Member.query("id > ?", 1); Member.queryAll();">
Member.countAll();
Member.count("id > ?", 1);
Member.queryByPrimaryKey(1);
Member.queryFirst("id = ?", 1);
Member.query("id > ?", 1);
Member.queryAll();
Paged querying
Page page = Page.create(0, 10);
PagedList<Member> members = Member.pagedQueryAll(page, Member.HAS_MANY_ORDERS);
Relation querying
Member.queryAll(Member.HAS_MANY_ORDERS);
Member.queryByPrimary(1, Member.HAS_MANY_ORDERS);
Member.queryByName("demo", Member.HAS_MANY_ORDERS);
...

Complex SQL programming

Order.Table orderTable = Order.asTable();
Select select = new Select();

// In ObjectiveSQL, Java operator can be overloaded
select.project(sum(orderTable.amount) / sum(orderTable.quantity) * 100)
        .from(orderTable)
        .where(orderTable.quantity > 30 &&
            orderTable.salesAt.between("2020-10-10 00:00:00", "2020-10-30 23:59:59"))
        .groupBy(orderTable.productId);
SELECT SUM(`T0`.`amount`) / SUM(`T0`.`quantity`) * 100
FROM `orders` AS `T0`
WHERE `T0`.`quantity` > 30 AND 
       `T0`.`sales_at` BETWEEN '2020-10-10 00:00:00' AND '2020-10-30 23:59:59')
GROUP BY `T0`.`product_id`

Reference documentation

Comments
  • 这个API 设计的很诡异

    这个API 设计的很诡异

    Select select = new Select();
    
    select.from(order, member)
            .where(order.memberId.eq(member.id));
    select.project(member.no,
            member.name,
            member.mobile,
            countDistinct(order.no).as("order_count"),
            sum(order.quantity).as("total_quantity"),
            sum(order.amount).as("total_amount"),
            min(order.salesAt).as("first_shopping"),
            max(order.salesAt).as("last_shopping"));
    select.groupBy(member.no, member.name, member.mobile);
    
    return select.execute(DatabaseType.MySQL, Member.class);
    

    execute 时的DatabaseType 是很别扭呀,其它的ORM 框架都需要明确告诉框架数据的类型,应该可以自动获取的

    enhancement 
    opened by oliviaour 5
  • 为啥生成的SQL 里太多括号呀?

    为啥生成的SQL 里太多括号呀?

    我运行了官方的示例,生成的SQL 如下:

    SELECT ((((SUM(`T0`.`amount` ) / SUM(`T0`.`quantity` ) )) * 100))
    FROM `orders` AS `T0`
    WHERE ((`T0`.`quantity` > 30) AND 
           `T0`.`sales_at` BETWEEN '2020-10-10 00:00:00' AND '2020-10-30 23:59:59')
    GROUP BY `T0`.`product_id`
    

    表达式里的括号太多了,看不太清。

    enhancement wontfix 
    opened by yeongher 5
  • 请问关联查询如何设置固定只取部分字段

    请问关联查询如何设置固定只取部分字段

     SELECT * FROM `sys_user` WHERE user_id in (148,149,150)    
    

    目前只想取 select user_name, 用@Transient无效

     meeMeeting = MeeMeeting.queryFirst("mee_id = ?",
                         new Relationship[]{ MeeMeeting.HAS_MANY_MEE_CHATS,
                                 MeeMeeting.HAS_MANY_SYS_FILE_INFOS,
                                 MeeMeeting.HAS_MANY_MEE_JOINS,
                                 MeeMeeting.HAS_MANY_MEE_VOTE_LIST,
                                 **MeeMeeting.HAS_ONE_MAIN_USERS**
                         },
                         meeId);
    
        @Transient
        private String userName;
    
    opened by forgottor 4
  • idea 2020.3.2编译能通过,不能启动

    idea 2020.3.2编译能通过,不能启动

    我在使用idea 2020.3.2版本遇到的情况, compile, install都没问题,但是 build时异常,不能启动,. 直接使用java -jar jar包能启动成功 异常信息:

    java: The class java.lang.IllegalArgumentException may be caused by the wrapped ProcessingEnvironment object.
      Please pass the wrapped ProcessingEnvironment further to super.init().
      If you need to access the original ProcessingEnvironment object (e.g. for creating com.sun.source.util.Trees.instance(ProcessingEnvironment)), you may use following code in the processor implementation:
    

    ProcessingEnvironment unwrappedprocessingEnv = jbUnwrap(ProcessingEnvironment.class, processingEnv);

    	where
    

    private static T jbUnwrap(Class<? extends T> iface, T wrapper) { T unwrapped = null; try { final Class<?> apiWrappers = wrapper.getClass().getClassLoader().loadClass("org.jetbrains.jps.javac.APIWrappers"); final Method unwrapMethod = apiWrappers.getDeclaredMethod("unwrap", Class.class, Object.class); unwrapped = iface.cast(unwrapMethod.invoke(null, iface, wrapper)); } catch (Throwable ignored) {} return unwrapped != null? unwrapped : wrapper; } `

    duplicate 
    opened by zhengdewei94 4
  • Springboot 2.3.5 环境下报 java: java.lang.IllegalArgumentException

    Springboot 2.3.5 环境下报 java: java.lang.IllegalArgumentException

    Executing pre-compile tasks... Loading Ant configuration... Running Ant tasks... Too many modules require recompilation, forcing full project rebuild Cleaning output directories... Running 'before' tasks Checking sources Copying resources... [SpringAvue] Parsing java... [SpringAvue] java: java.lang.IllegalArgumentException java: java.lang.IllegalArgumentException javac 1.8.0_261 was used to compile java sources Finished, saving caches... Executing post-compile tasks... Loading Ant configuration... Running Ant tasks... Synchronizing output directories... 2021/1/4 下午2:16 - Build completed with 2 errors and 0 warnings in 19 sec, 239 ms

    ---- 删除objsql-springboot库引用后正常跑起(JDK8.0)

    plugin-bug 
    opened by sinowo 4
  • 查询语句中自动生成一个all 的字段,避免写很多字段的问题

    查询语句中自动生成一个all 的字段,避免写很多字段的问题

    SysUserDB.Table sysuser =SysUserDB.asTable();
    Select select = new Select();
    select.project(sysuser.deptId,sysuser.email,sysuser.id,sysuser.name,sysuser.password,sysuser.roles,sysuser.status)
    	.from(sysuser)
    	.where(sysuser.id.eq(4));
    

    查询字段过多时一个一个写字段不方便!

    enhancement 
    opened by linglongchen 4
  • Quickfix error

    Quickfix error

    我在execute 上进行Quckfix 操作, “Add throws on method",生成的代码如下:

        public static List<Order> queryOrders(String begin, String end, String[] memberNos)SQLSyntaxException
                 {
            Order.Table order = Order.asTable();
            Member.Table member = Member.asTable();
            Select select = new Select();
    
            return select.execute(DatabaseType.MySQL, Order.class);
        }
    

    很明显有问题,

    bug 
    opened by yeongher 4
  • 打开ObjectiveSQL 报错

    打开ObjectiveSQL 报错

    ObjectiveSQL 1.3.7, IntelliJ IDEA 插件:1.2.8,报错信息如下:

    org.intellij.sequencer.SequencePlugin2@65ab3257
    
    com.intellij.serviceContainer.AlreadyDisposedException: Already disposed: Project(name=funcsql, containerState=DISPOSE_IN_PROGRESS, componentStore=/Users/braisdom/funcsql)
    	at com.intellij.serviceContainer.ComponentManagerImpl.getMessageBus(ComponentManagerImpl.kt:140)
    	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.fireStateChanged(ToolWindowManagerImpl.kt:1488)
    	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.unregisterToolWindow(ToolWindowManagerImpl.kt:1052)
    	at org.intellij.sequencer.SequencePlugin2.projectClosed(SequencePlugin2.java:81)
    	at com.intellij.openapi.project.impl.ProjectManagerImpl.fireProjectClosed(ProjectManagerImpl.java:480)
    	at com.intellij.openapi.project.impl.ProjectManagerImpl.lambda$closeProject$5(ProjectManagerImpl.java:383)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:980)
    	at com.intellij.openapi.project.impl.ProjectManagerImpl.closeProject(ProjectManagerImpl.java:372)
    	at com.intellij.openapi.project.impl.ProjectManagerImpl.closeAndDispose(ProjectManagerImpl.java:407)
    	at com.intellij.openapi.wm.impl.CloseProjectWindowHelper.closeProjectAndShowWelcomeFrameIfNoProjectOpened(CloseProjectWindowHelper.kt:44)
    	at com.intellij.openapi.wm.impl.CloseProjectWindowHelper.windowClosing(CloseProjectWindowHelper.kt:32)
    	at com.intellij.openapi.wm.impl.ProjectFrameHelper$2.windowClosing(ProjectFrameHelper.java:225)
    	at java.desktop/java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:357)
    	at java.desktop/java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:357)
    	at java.desktop/java.awt.Window.processWindowEvent(Window.java:2079)
    	at java.desktop/javax.swing.JFrame.processWindowEvent(JFrame.java:298)
    	at java.desktop/java.awt.Window.processEvent(Window.java:2038)
    	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
    	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
    	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
    	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    	at java.base/java.security.AccessController.doPrivileged(Native Method)
    	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
    	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
    	at java.base/java.security.AccessController.doPrivileged(Native Method)
    	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
    	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:971)
    	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:841)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:452)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:451)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802)
    	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:505)
    	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    
    bug 
    opened by yeongher 4
  • 整合springboot报错哎, The connectionFactory cannot be null

    整合springboot报错哎, The connectionFactory cannot be null

    2020-11-14 17:11:09.963 WARN 7360 --- [nio-8080-exec-6] .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by Handler execution: java.lang.IllegalStateException: The connectionFactory cannot be null 这个错啥意思?不懂了

    enhancement good first issue 
    opened by BruceLvLvXin 4
  • IntelliJ 插件报错

    IntelliJ 插件报错

    java.lang.Throwable: Non-idempotent computation: it returns different results when invoked multiple times or on different threads:
      Light PSI class: Table != Light PSI class: Table
      which is 0th element of [Light PSI class: Table] and [Light PSI class: Table]
    
    Recomputation gives com.intellij.util.CachedValueBase$Data@19385316 which is different from both values
    Recomputation log:
      Resolving PsiJavaCodeReferenceElement:Relation of class com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl
    	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:143)
    	at com.intellij.util.IdempotenceChecker.reportFailure(IdempotenceChecker.java:92)
    	at com.intellij.util.IdempotenceChecker.checkEquivalence(IdempotenceChecker.java:79)
    	at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:245)
    	at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
    	at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:76)
    	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:150)
    	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:120)
    	at com.github.braisdom.objsql.intellij.ObjSqlPsiAugmentProvider.getAugments(ObjSqlPsiAugmentProvider.java:50)
    	at com.intellij.psi.augment.PsiAugmentProvider.lambda$getAugments$0(PsiAugmentProvider.java:58)
    	at com.intellij.util.containers.ConcurrentFactoryMap$2.create(ConcurrentFactoryMap.java:174)
    	at com.intellij.util.containers.ConcurrentFactoryMap.get(ConcurrentFactoryMap.java:40)
    	at com.intellij.psi.augment.PsiAugmentProvider.getAugments(PsiAugmentProvider.java:61)
    	at com.intellij.psi.augment.PsiAugmentProvider.lambda$collectAugments$2(PsiAugmentProvider.java:110)
    	at com.intellij.psi.augment.PsiAugmentProvider.forEach(PsiAugmentProvider.java:177)
    	at com.intellij.psi.augment.PsiAugmentProvider.collectAugments(PsiAugmentProvider.java:109)
    	at com.intellij.psi.impl.source.ClassInnerStuffCache.lambda$getInnerClassesMap$10(ClassInnerStuffCache.java:196)
    	at com.intellij.util.containers.ConcurrentFactoryMap$2.create(ConcurrentFactoryMap.java:174)
    	at com.intellij.util.containers.ConcurrentFactoryMap.get(ConcurrentFactoryMap.java:40)
    	at com.intellij.psi.impl.source.ClassInnerStuffCache.findInnerClassByName(ClassInnerStuffCache.java:80)
    	at com.intellij.psi.impl.source.PsiClassImpl.findInnerClassByName(PsiClassImpl.java:377)
    	at com.intellij.psi.impl.PsiClassImplUtil.processCachedMembersByName(PsiClassImplUtil.java:540)
    	at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClass(PsiClassImplUtil.java:458)
    	at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClass(PsiClassImplUtil.java:435)
    	at com.intellij.psi.impl.source.PsiClassImpl.processDeclarations(PsiClassImpl.java:474)
    	at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:75)
    	at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:54)
    	at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:221)
    	at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:150)
    	at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.resolve(PsiJavaCodeReferenceElementImpl.java:489)
    	at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.access$100(PsiJavaCodeReferenceElementImpl.java:44)
    	at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl$OurGenericsResolver.resolve(PsiJavaCodeReferenceElementImpl.java:375)
    	at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl$OurGenericsResolver.resolve(PsiJavaCodeReferenceElementImpl.java:368)
    	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolveWithCaching$2(ResolveCache.java:185)
    	at com.intellij.openapi.util.Computable.get(Computable.java:17)
    
    bug 
    opened by yeongher 4
  • 请问 create保存数据的时候,为什么date类型的字段没有保存

    请问 create保存数据的时候,为什么date类型的字段没有保存

    INSERT INTO mee_join (join_id,meeting_id,user_id,join_type,status) VALUES (?,?,?,?,?), with: [null,133,1,0,0]

    meeJoin.setInTime(new Date()); MeeJoin.create(meeJoin,true);

    duplicate 
    opened by forgottor 3
  • 你好 queryFirst 关联查询报错

    你好 queryFirst 关联查询报错

    MeeMeeting m = MeeMeeting.queryFirst("mee_id > ?", MeeMeeting.HAS_MANY_MEE_CHATS,1L)

    @Relation(relationType = RelationType.HAS_MANY,foreignKey = "meeting_id",foreignFieldName = "meetingId") private List meeChats;

    Invalid argument value: java.io.NotSerializableException Query: SELECT * FROM mee_meeting WHERE mee_id > ? Parameters: [com.github.braisdom.objsql.relation.Relationship@3d534f26, 1]

    bug 
    opened by forgottor 8
  • IntelliJ IDEA 2020.3 异常

    IntelliJ IDEA 2020.3 异常

    In file: file:///Users/braisdom/funcsql/examples/sqlite/src/test/java/com/github/braisdom/objsql/example/ComplexSQLExample.java
    
    com.intellij.util.IncorrectOperationException: Incorrect expression 'java.util.List<com.github.braisdom.objsql.example.domains.Member>.valueOf(select.execute(Member.class))'
    	at com.intellij.psi.impl.PsiJavaParserFacadeImpl.newException(PsiJavaParserFacadeImpl.java:388)
    	at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createExpressionFromText(PsiJavaParserFacadeImpl.java:295)
    	at com.intellij.psi.impl.PsiElementFactoryImpl.createExpressionFromText(PsiElementFactoryImpl.java:640)
    	at com.github.braisdom.objsql.intellij.oo.OOResolver.resolveMethod(OOResolver.java:99)
    	at com.github.braisdom.objsql.intellij.oo.OOResolver.isTypeConvertible(OOResolver.java:79)
    	at com.github.braisdom.objsql.intellij.oo.OOHighlightVisitorImpl.visitVariable(OOHighlightVisitorImpl.java:128)
    	at com.intellij.psi.JavaElementVisitor.visitLocalVariable(JavaElementVisitor.java:164)
    	at com.intellij.psi.impl.source.tree.java.PsiLocalVariableImpl.accept(PsiLocalVariableImpl.java:279)
    	at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.visit(HighlightVisitorImpl.java:185)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:336)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:269)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:295)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:298)
    	at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.lambda$analyze$1(HighlightVisitorImpl.java:210)
    	at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder.analyze(RefCountHolder.java:370)
    	at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:209)
    	at com.github.braisdom.objsql.intellij.oo.OOHighlightVisitorImpl.analyze(OOHighlightVisitorImpl.java:48)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:298)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:298)
    	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:96)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:298)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:266)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:212)
    	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
    	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:400)
    	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:393)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
    	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:392)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:368)
    	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:172)
    	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:366)
    	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
    	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
    Caused by: java.lang.AssertionError: Unexpected token: '.'
    	at com.intellij.lang.java.parser.JavaParserUtil.parseFragment(JavaParserUtil.java:210)
    	at com.intellij.psi.impl.source.tree.JavaElementType$JavaDummyElementType.parseContents(JavaElementType.java:269)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:192)
    	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:567)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:191)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:242)
    	at com.intellij.psi.impl.source.JavaDummyElement.getFirstChildNode(JavaDummyElement.java:69)
    	at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createExpressionFromText(PsiJavaParserFacadeImpl.java:293)
    	... 40 more
    
    plugin-bug 
    opened by yeongher 5
  • IntelliJ 插件后台报错

    IntelliJ 插件后台报错

    版本1.3.2

    2020-12-14 16:34:43,045 [7959441]  ERROR - n.impl.GeneralHighlightingPass - In file: file:///Users/braisdom/funcsql/core/src/main/java/com/github/braisdom/objsql/javac/JavaOOPlugin.java 
    com.intellij.util.IncorrectOperationException: Incorrect expression 'com.sun.tools.javac.util.ListBuffer<com.sun.tools.javac.tree.JCTree.JCExpression>.valueOf(new ListBuffer<>())'
    	at com.intellij.psi.impl.PsiJavaParserFacadeImpl.newException(PsiJavaParserFacadeImpl.java:389)
    	at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createExpressionFromText(PsiJavaParserFacadeImpl.java:296)
    	at com.intellij.psi.impl.PsiElementFactoryImpl.createExpressionFromText(PsiElementFactoryImpl.java:633)
    	at com.github.braisdom.objsql.intellij.oo.OOResolver.resolveMethod(OOResolver.java:99)
    	at com.github.braisdom.objsql.intellij.oo.OOResolver.isTypeConvertible(OOResolver.java:79)
    	at com.github.braisdom.objsql.intellij.oo.OOHighlightVisitorImpl.visitVariable(OOHighlightVisitorImpl.java:124)
    	at com.intellij.psi.JavaElementVisitor.visitLocalVariable(JavaElementVisitor.java:164)
    	at com.intellij.psi.impl.source.tree.java.PsiLocalVariableImpl.accept(PsiLocalVariableImpl.java:279)
    	at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.visit(HighlightVisitorImpl.java:184)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:338)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:277)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:297)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:300)
    	at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.lambda$analyze$1(HighlightVisitorImpl.java:209)
    	at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder.analyze(RefCountHolder.java:362)
    	at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:208)
    	at com.github.braisdom.objsql.intellij.oo.OOHighlightVisitorImpl.analyze(OOHighlightVisitorImpl.java:49)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:300)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:300)
    	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:96)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:300)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:268)
    	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:214)
    	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:80)
    	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:54)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:399)
    	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1110)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:392)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
    	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:391)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:367)
    	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:170)
    	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:182)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:365)
    	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181)
    	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
    Caused by: java.lang.AssertionError: Unexpected token: '.'
    	at com.intellij.lang.java.parser.JavaParserUtil.parseFragment(JavaParserUtil.java:209)
    	at com.intellij.psi.impl.source.tree.JavaElementType$JavaDummyElementType.parseContents(JavaElementType.java:269)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:192)
    	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:565)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:191)
    	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:242)
    	at com.intellij.psi.impl.source.JavaDummyElement.getFirstChildNode(JavaDummyElement.java:69)
    	at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createExpressionFromText(PsiJavaParserFacadeImpl.java:294)
    	... 40 more
    
    plugin-bug 
    opened by yeongher 1
Owner
Braisdom
Focusing data analysis forever
Braisdom
Fast and Easy mapping from database and csv to POJO. A java micro ORM, lightweight alternative to iBatis and Hibernate. Fast Csv Parser and Csv Mapper

Simple Flat Mapper Release Notes Getting Started Docs Building it The build is using Maven. git clone https://github.com/arnaudroger/SimpleFlatMapper.

Arnaud Roger 418 Dec 17, 2022
Storm - a fast, easy to use, no-bullshit opinionated Java ORM inspired by Doctrine

A stupidly simple Java/MySQL ORM with native Hikaricp and Redis cache support supporting MariaDB and Sqlite

Mats 18 Dec 1, 2022
greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.

Check out ObjectBox Check out our new mobile database ObjectBox (GitHub repo). ObjectBox is a superfast object-oriented database with strong relation

Markus Junginger 12.6k Jan 5, 2023
Ebean ORM

Ebean ORM

Ebean ORM 1.3k Jan 5, 2023
DAO oriented database mapping framework for Java 8+

Doma Doma 2 is a database access framework for Java 8+. Doma has various strengths: Verifies and generates source code at compile time using annotatio

domaframework 353 Dec 28, 2022
MyBatis SQL mapper framework for Java

MyBatis SQL Mapper Framework for Java The MyBatis SQL mapper framework makes it easier to use a relational database with object-oriented applications.

MyBatis 18k Jan 2, 2023
Language-Natural Persistence Layer for Java

Permazen is a better persistence layer for Java Persistence is central to most applications. But there are many challenges involved in persistence pro

Permazen 322 Dec 12, 2022
Java 8 annotation processor and framework for deriving algebraic data types constructors, pattern-matching, folds, optics and typeclasses.

Derive4J: Java 8 annotation processor for deriving algebraic data types constructors, pattern matching and more! tl;dr Show me how to write, say, the

null 543 Nov 23, 2022
Java 8 annotation processor and framework for deriving algebraic data types constructors, pattern-matching, folds, optics and typeclasses.

Derive4J: Java 8 annotation processor for deriving algebraic data types constructors, pattern matching and more! tl;dr Show me how to write, say, the

null 543 Nov 23, 2022
an Application Framework for implementing the MVVM Pattern with JavaFX

mvvmFX is an application framework which provides you necessary components to implement the MVVM pattern with JavaFX. MVVM is the enhanced version of

Alexander Casall 438 Dec 28, 2022
JavaFX micro-framework that follows MVVM Pattern with Google Guice dependency Injection

ReactiveDeskFX (JavaFX and Google Guice MVVM Pattern micro-framework) JavaFX micro-framework to develop very fast JavaFX components with minimal code

TangoraBox 3 Jan 9, 2022
Demo Repo for our CDC-based Strangler Fig Pattern Session @ VoxxedDays Romania 2021

Strangler Fig Pattern Demo Build applications Before being able to spin up the docker-compose based demo environment please make sure to successfully

Hans-Peter Grahsl 5 Feb 20, 2022
ORM16 is a library exploring code generation-based approach to ORM for Java 17 and focusing on records as persistent data model

About ORM16 ORM16 is a library exploring code generation-based approach to ORM for Java 17 and focusing on records as persistent data model. Example I

Ivan Gammel 1 Mar 30, 2022
Mars - Object Relational Mapping Framework for MongoDB (MongoDB ORM)

Mars Object Relational Mapping Framework for MongoDB 致自己 造自己的轮子,让别人去说 ; What is Mars Mars is a unified driver platform product developed by Shanghai J

null 35 Nov 17, 2022
Automatic generation of the Builder pattern for Java

FreeBuilder Automatic generation of the Builder pattern for Java 1.8+ The Builder pattern is a good choice when designing classes whose constructors o

inferred.org 797 Dec 19, 2022
Saga pattern with Java => order -> payment -> stock microservices are ready to use

Order_Payment_Stock_Saga_Pattern Saga pattern with Java => order -> payment -> stock microservices are ready to use Docker-compose.yaml You can see th

Gurkan İlleez 5 Dec 27, 2022
A circuit breaker design pattern for dropwizard

Status Circuit Breaker Library This library provides a simple implementation of a circuit breaker design pattern. It uses dropwizard metrics to provid

null 41 Apr 7, 2022
Test project for learning GoF design pattern

DesignPattern Test project for learning GoF design pattern ㅁ개요 객체지향 설계의 교과서라고 불리는 Design Pattern 을 직접 Activity 별로 구현해봤습니다. ㅁ동기 물론 디자인패턴을 몰라도 기능은 얼마든지

null 11 Aug 8, 2022
Spring Boot DTO Example Tutorial | Data Transfer Object Pattern

springboot-dto-tutorial Spring Boot DTO Example Tutorial | Data Transfer Object Pattern at https://youtu.be/THv-TI1ZNMk Spring Boot DTO Tutorial - Ent

Ramesh Fadatare 20 Nov 16, 2022
Human Resource Management Application on JavaFX using MVC Design Pattern

Human-Resource-Management-System-with-JFoenix Human Resource Management Application on JavaFX using MVC Design Pattern Built With Java JavaFX - FXML C

Bahadır Ünal 0 Mar 18, 2022