-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java support #147
Comments
I guess it is available to use this library with Java, but I have not tried. |
@raderio |
@raderio package com.improve_future.harmonica_test.jarmonica.migration;
import com.improve_future.harmonica.core.AbstractMigration;
import com.improve_future.harmonica.core.table.TableBuilder;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
public class M2020012345678_Migration extends AbstractMigration {
@Override
public void up() {
createTable("test_table", new Function1<TableBuilder, Unit>() {
@Override
public Unit invoke(TableBuilder tableBuilder) {
tableBuilder.integer("integer_column", false, (long) 10, false);
return Unit.INSTANCE;
}
});
}
@Override
public void down() {
}
} As a Kotlin feature, Kotlin can coexist in Java projects. So you can write it in Kotlin even if your project is in Java. References |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible to use this library with Java language? It will increase the popularity if it will possible to use it also in Java and have Kotlin DSL
The text was updated successfully, but these errors were encountered: