MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / drop

Function drop

examples/interfaces/07.blob.cpp:52–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52static void drop(IAttachment** att)
53{
54 // With CheckStatusWrapper passed as status interface noting is thrown on error
55 // You should check status yourself
56 CheckStatusWrapper status(master->getStatus());
57
58 // drop database (will close interface)
59 (*att)->dropDatabase(&status);
60 if (status.getState() & IStatus::STATE_ERRORS)
61 {
62 errPrint(&status);
63 fprintf(stderr, "*** Drop database failed - do it manually before next run ***\n");
64 }
65 else
66 *att = NULL;
67
68 // cleanup
69 status.dispose();
70}
71
72int main()
73{

Callers 1

mainFunction · 0.85

Calls 5

errPrintFunction · 0.70
getStatusMethod · 0.45
dropDatabaseMethod · 0.45
getStateMethod · 0.45
disposeMethod · 0.45

Tested by

no test coverage detected