public void deletePost ( final long postId ) throws SQLException { clearPostMeta ( postId ) ; Connection conn = null ; PreparedStatement stmt = null ; Timer . Context ctx = metrics . deletePostTimer . time ( ) ; try { conn = connectionSupplier . getConnection ( ) ; stmt = conn . prepareStatement ( deletePostIdSQL ) ; stmt . setLong ( 1 , postId ) ; stmt . executeUpdate ( ) ; } finally { ctx . stop ( ) ; SQLUtil . closeQuietly ( conn , stmt ) ; } }
Deletes a post with a specified id including all associated metadata .