No Description

AWSFMDB+AWSHelpers.h 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License").
  5. // You may not use this file except in compliance with the License.
  6. // A copy of the License is located at
  7. //
  8. // http://aws.amazon.com/apache2.0
  9. //
  10. // or in the "license" file accompanying this file. This file is distributed
  11. // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  12. // express or implied. See the License for the specific language governing
  13. // permissions and limitations under the License.
  14. //
  15. #import <AWSCore/AWSCore.h>
  16. #import "AWSFMDatabasePool.h"
  17. #import "AWSFMDatabaseQueue.h"
  18. NS_ASSUME_NONNULL_BEGIN
  19. @interface AWSFMDatabaseQueue (AWSHelpers)
  20. /**
  21. Convenience method to open a database queue with the SQLITE_OPEN_FULLMUTEX flag so it can be safely accessed across
  22. threads.
  23. @param aPath The file path of the database.
  24. @return The `FMDatabaseQueue` object. `nil` on error.
  25. */
  26. + (instancetype)serialDatabaseQueueWithPath:(NSString*)aPath;
  27. @end
  28. @interface AWSFMDatabasePool (AWSHelpers)
  29. /**
  30. Convenience method to create a database pool with the SQLITE_OPEN_FULLMUTEX flag so it can be safely accessed across
  31. threads.
  32. @param aPath The file path of the database.
  33. @return The `FMDatabasePool` object. `nil` on error.
  34. */
  35. + (instancetype)serialDatabasePoolWithPath:(NSString*)aPath;
  36. @end
  37. NS_ASSUME_NONNULL_END