-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support sql statement execution in kafkasql storage
- Loading branch information
1 parent
1d7dc3d
commit 3c8d3c6
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...java/io/apicurio/registry/storage/impl/kafkasql/messages/ExecuteSqlStatement1Message.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.apicurio.registry.storage.impl.kafkasql.messages; | ||
|
||
import io.apicurio.registry.storage.RegistryStorage; | ||
import io.apicurio.registry.storage.impl.kafkasql.AbstractMessage; | ||
import io.apicurio.registry.storage.impl.sql.SqlRegistryStorage; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = false) | ||
@ToString | ||
public class ExecuteSqlStatement1Message extends AbstractMessage { | ||
|
||
private String sql; | ||
|
||
/** | ||
* @see io.apicurio.registry.storage.impl.kafkasql.KafkaSqlMessage#dispatchTo(RegistryStorage) | ||
*/ | ||
@Override | ||
public Object dispatchTo(RegistryStorage storage) { | ||
SqlRegistryStorage sqlStorage = (SqlRegistryStorage) storage; | ||
sqlStorage.executeSqlStatement(sql); | ||
return null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters