| 11 | }; |
| 12 | |
| 13 | TEST_F(CApiPreparedStatementTest, IsSuccess) { |
| 14 | lbug_prepared_statement preparedStatement; |
| 15 | lbug_state state; |
| 16 | auto connection = getConnection(); |
| 17 | auto query = "MATCH (a:person) WHERE a.isStudent = $1 RETURN COUNT(*)"; |
| 18 | state = lbug_connection_prepare(connection, query, &preparedStatement); |
| 19 | ASSERT_EQ(state, LbugSuccess); |
| 20 | ASSERT_NE(preparedStatement._prepared_statement, nullptr); |
| 21 | ASSERT_TRUE(lbug_prepared_statement_is_success(&preparedStatement)); |
| 22 | lbug_prepared_statement_destroy(&preparedStatement); |
| 23 | |
| 24 | query = "MATCH (a:personnnn) WHERE a.isStudent = $1 RETURN COUNT(*)"; |
| 25 | state = lbug_connection_prepare(connection, query, &preparedStatement); |
| 26 | ASSERT_EQ(state, LbugSuccess); |
| 27 | ASSERT_NE(preparedStatement._prepared_statement, nullptr); |
| 28 | ASSERT_FALSE(lbug_prepared_statement_is_success(&preparedStatement)); |
| 29 | lbug_prepared_statement_destroy(&preparedStatement); |
| 30 | } |
| 31 | |
| 32 | TEST_F(CApiPreparedStatementTest, IsReadOnly) { |
| 33 | lbug_prepared_statement preparedStatement; |
nothing calls this directly
no test coverage detected