1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
//! OxiGDAL PostGIS - PostgreSQL/PostGIS Integration
//!
//! This crate provides PostgreSQL/PostGIS integration for the OxiGDAL ecosystem,
//! enabling spatial database workflows with connection pooling and async operations.
//!
//! # Features
//!
//! - **Connection Pooling**: Efficient connection management with deadpool-postgres
//! - **Spatial Queries**: Fluent API for building spatial queries
//! - **Streaming**: Stream large result sets efficiently
//! - **Batch Operations**: Batch inserts for high performance
//! - **Transaction Support**: Full transaction management with savepoints
//! - **Type Safety**: Strong type conversions between OxiGDAL and PostGIS
//! - **WKB Support**: Efficient Well-Known Binary encoding/decoding
//!
//! # Example
//!
//! ```ignore
//! use oxigdal_postgis::*;
//! use oxigdal_core::types::BoundingBox;
//!
//! # async fn example() -> Result<()> {
//! // Create connection pool
//! let config = ConnectionConfig::new("gis_database")
//! .host("localhost")
//! .user("postgres")
//! .password("password");
//!
//! let pool = ConnectionPool::new(config)?;
//!
//! // Check PostGIS is available
//! let health = pool.health_check().await?;
//! if !health.postgis_installed {
//! eprintln!("PostGIS is not installed!");
//! return Ok(());
//! }
//!
//! // Query features within bounding box
//! let bbox = BoundingBox::new(-180.0, -90.0, 180.0, 90.0)?;
//! let features = SpatialQuery::new("buildings")?
//! .where_bbox(&bbox)?
//! .limit(1000)
//! .execute(&pool)
//! .await?;
//!
//! println!("Found {} features", features.len());
//!
//! // Write features to database
//! let mut writer = PostGisWriter::new(pool.clone(), "results")
//! .srid(4326)
//! .create_table(true);
//!
//! for feature in features {
//! writer.add_to_batch(feature);
//! }
//! writer.flush().await?;
//! # Ok(())
//! # }
//! ```
//!
//! # SQL Injection Prevention
//!
//! All SQL generation is protected against SQL injection attacks through:
//! - Parameterized queries
//! - Identifier validation and quoting
//! - Safe SQL builders
//!
//! # Performance
//!
//! - Connection pooling reduces connection overhead
//! - Batch operations improve write performance
//! - Streaming API supports large datasets
//! - Spatial indexes are automatically used
//!
//! # Requirements
//!
//! - PostgreSQL 12 or later
//! - PostGIS 3.0 or later
// Pedantic disabled to reduce noise - default clippy::all is sufficient
// #![warn(clippy::pedantic)]
// Allow collapsible match for explicit SQL building patterns
// Allow expect() for internal database state invariants
// Allow async fn in traits for database operations
// Allow dead code for future features
// Allow unsafe blocks in transaction module for FFI
// Re-export commonly used items
pub use ;
pub use ;
pub use ;
pub use ;
pub use PostGisReader;
pub use functions;
pub use Transaction;
pub use ;
pub use ;
pub use PostGisWriter;
/// Crate version
pub const VERSION: &str = env!;
/// Crate name
pub const NAME: &str = env!;