use of com.google.cloud.spanner.Mutation in project beam by apache.
the class MutationUtilsTest method testCreateUpdateMutationFromRow.
@Test
public void testCreateUpdateMutationFromRow() {
Mutation expectedMutation = createMutation(Mutation.Op.UPDATE);
Mutation mutation = beamRowToMutationFn(Mutation.Op.UPDATE, TABLE).apply(WRITE_ROW);
assertEquals(expectedMutation, mutation);
}
use of com.google.cloud.spanner.Mutation in project beam by apache.
the class MutationUtilsTest method testCreateInsertOrUpdateMutationFromRowWithNulls.
@Test
public void testCreateInsertOrUpdateMutationFromRowWithNulls() {
Mutation expectedMutation = createMutationNulls(Mutation.Op.INSERT_OR_UPDATE);
Mutation mutation = beamRowToMutationFn(Mutation.Op.INSERT_OR_UPDATE, TABLE).apply(WRITE_ROW_NULLS);
assertEquals(expectedMutation, mutation);
}
use of com.google.cloud.spanner.Mutation in project beam by apache.
the class MutationUtilsTest method testCreateInsertOrUpdateMutationFromRow.
@Test
public void testCreateInsertOrUpdateMutationFromRow() {
Mutation expectedMutation = createMutation(Mutation.Op.INSERT_OR_UPDATE);
Mutation mutation = beamRowToMutationFn(Mutation.Op.INSERT_OR_UPDATE, TABLE).apply(WRITE_ROW);
assertEquals(expectedMutation, mutation);
}
use of com.google.cloud.spanner.Mutation in project beam by apache.
the class MutationUtilsTest method testCreateUpdateMutationFromRowWithNulls.
@Test
public void testCreateUpdateMutationFromRowWithNulls() {
Mutation expectedMutation = createMutationNulls(Mutation.Op.UPDATE);
Mutation mutation = beamRowToMutationFn(Mutation.Op.UPDATE, TABLE).apply(WRITE_ROW_NULLS);
assertEquals(expectedMutation, mutation);
}
use of com.google.cloud.spanner.Mutation in project beam by apache.
the class MutationUtilsTest method testCreateDeleteMutationFromRowWithNulls.
@Test
public void testCreateDeleteMutationFromRowWithNulls() {
Mutation expectedMutation = createDeleteMutationNulls();
Mutation mutation = beamRowToMutationFn(Mutation.Op.DELETE, TABLE).apply(KEY_ROW_NULLS);
assertEquals(expectedMutation, mutation);
}
Aggregations