1 // 2 // BulkExtraction.h 3 // 4 // Library: Data 5 // Package: DataCore 6 // Module: Bulk 7 // 8 // Definition of the BulkExtraction class. 9 // 10 // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. 11 // and Contributors. 12 // 13 // SPDX-License-Identifier: BSL-1.0 14 // 15 16 17 #ifndef Data_Bulk_INCLUDED 18 #define Data_Bulk_INCLUDED 19 20 21 #include "Poco/Void.h" 22 #include "Poco/Data/Limit.h" 23 24 25 namespace Poco { 26 namespace Data { 27 28 29 class Data_API Bulk 30 { 31 public: 32 Bulk(const Limit& limit); 33 /// Creates the Bulk. 34 35 Bulk(Poco::UInt32 value); 36 /// Creates the Bulk. 37 38 ~Bulk(); 39 /// Destroys the bulk. 40 41 const Limit& limit() const; 42 /// Returns the limit asociated with this bulk object. 43 44 Poco::UInt32 size() const; 45 /// Returns the value of the limit asociated with 46 /// this bulk object. 47 48 private: 49 Bulk(); 50 51 Limit _limit; 52 }; 53 54 55 /// 56 /// inlines 57 /// limit()58inline const Limit& Bulk::limit() const 59 { 60 return _limit; 61 } 62 63 size()64inline Poco::UInt32 Bulk::size() const 65 { 66 return _limit.value(); 67 } 68 69 70 namespace Keywords { 71 72 73 inline Bulk bulk(const Limit& limit = Limit(Limit::LIMIT_UNLIMITED, false, false)) 74 /// Convenience function for creation of bulk. 75 { 76 return Bulk(limit); 77 } 78 79 bulk(Void)80inline void bulk(Void) 81 /// Dummy bulk function. Used for bulk binding creation 82 /// (see BulkBinding) and bulk extraction signalling to Statement. 83 { 84 } 85 86 87 } // namespace Keywords 88 89 90 typedef void (*BulkFnType)(Void); 91 92 93 } } // namespace Poco::Data 94 95 96 #endif // Data_Bulk_INCLUDED 97