Implementation of SQLSetDescRec & SQLGetDescRec functions (#23)
authorHunaid Sohail <76044242+Hunaid2000@users.noreply.github.com>
Sun, 11 Aug 2024 23:30:48 +0000 (04:30 +0500)
committerGitHub <noreply@github.com>
Sun, 11 Aug 2024 23:30:48 +0000 (19:30 -0400)
commit334247d466e814996138499016bc2eaf5f12bcc7
treedfe5acdd450a2ef4e94aefaee655db6a071948b3
parent5949d81adabab3f6623d67e6be59d39f9e66a442
Implementation of SQLSetDescRec & SQLGetDescRec functions (#23)

* Implemented SQLSetDescRec function

- Fixed SQL_DESC_PRECISION field in IPDSetField & IPDGetField functions
- Added support for other fields for bookmark column in ARDSetField
  - SQL_DESC_TYPE
  - SQL_DESC_DATETIME_INTERVAL_CODE
  - SQL_DESC_OCTET_LENGTH
  - SQL_DESC_PRECISION
  - SQL_DESC_SCALE

* Implemented SQLGetDescRec function

- Handled SQL_NO_DATA case in GetField functions
- Handled 01004 SQLSTATE in GetField functions
- Added support for SQL_DESC_NAME & SQL_DESC_NULLABLE IPDGetField functions

* Implemented SQLGetDescRecW & SQLSetDescRecW functions

- Updated PGAPI_GetFunctions function to get new functions
- Updated psqlodbc.def file for new functions on Windows
- Fixed HY007 error handling

* Added regression test for DescRec functions
12 files changed:
descriptor.c
descriptor.h
info.c
odbcapi30.c
odbcapi30w.c
pgapi30.c
pgapifunc.h
psqlodbc.def
test/expected/descrec.out [new file with mode: 0644]
test/expected/descrec_1.out [new file with mode: 0644]
test/src/descrec-test.c [new file with mode: 0644]
test/tests