Skip to content

Commit

Permalink
Merge pull request #139 from AnuragVanam/master
Browse files Browse the repository at this point in the history
Update issue#133
  • Loading branch information
ZihengSun authored Mar 28, 2021
2 parents 4909c4b + 1aee32a commit e48b6be
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.gw</groupId>
<artifactId>geoweaver</artifactId>
<version>0.9.2</version>
<version>0.9.3</version>
<name>geoweaver</name>
<description>A workflow management for hybrid AI experiments of various scales</description>

Expand All @@ -19,7 +19,7 @@

<properties>

<java.version>1.8</java.version>
<!-- <java.version>1.8</java.version> -->

<org.springframework-version>[5.3.1,)</org.springframework-version>

Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/gw/GeoweaverApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public static void main(String[] args) {


}

public static void browse(String url) {
if(Desktop.isDesktopSupported()){
Desktop desktop = Desktop.getDesktop();
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/gw/database/HostRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import com.gw.jpa.Host;

public interface HostRepository extends CrudRepository<Host, String>{

@Query(value="select * from hosts where owner = ?1 ",
@Query(value="select * from host where owner = ?1 ",
nativeQuery = true)
Collection<Host> findByOwner(String owner);

@Query(value="select * from hosts where name like '%?1%'",
@Query(value="select * from HOST where name like CONCAT('%',:keyword,'%')",
nativeQuery = true)
Collection<Host> findHostsByNameAlike(String keyword);
Collection<Host> findHostsByNameAlike(@Param("keyword") String keyword);



Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/gw/database/ProcessRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import com.gw.jpa.GWProcess;
import com.gw.jpa.Host;

public interface ProcessRepository extends CrudRepository<GWProcess, String>{

@Query(value = "select * from GWProcess where name like '%?1%'",
@Query(value = "select * from GWProcess where name like CONCAT('%',:keyword,'%')",
nativeQuery = true)
Collection<GWProcess> findProcessesByNameAlike(String keyword);
Collection<GWProcess> findProcessesByNameAlike(@Param("keyword") String keyword);

@Query(value="select * from gwprocess where description = 'python'",
nativeQuery = true)
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/gw/database/WorkflowRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import com.gw.jpa.GWProcess;
import com.gw.jpa.Workflow;

public interface WorkflowRepository extends CrudRepository<Workflow, String>{

@Query(value="select * from workflow where name like '%?1%'",
@Query(value="select * from workflow where name like CONCAT('%',:keyword,'%')",
nativeQuery=true)
Collection<Workflow> findProcessesByNameAlike(String keyword);
Collection<Workflow> findProcessesByNameAlike(@Param("keyword") String keyword);

}

0 comments on commit e48b6be

Please sign in to comment.