14 Commits

Author SHA1 Message Date
Aleksander Czajczynski
ce1bc20399 2024-12-19 10:24 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* contrib/rddsql/sqlbase.c
    % cleanup unnecessary braces

  * ChangeLog.txt
    + missing entry from pull request #364
2024-12-19 10:25:11 +01:00
Eric Lendvai
076589f03a On branch rddsql_add_timestamp_support
Changes to be committed:
modified:   ChangeLog.txt
modified:   contrib/rddsql/sqlbase.c
modified:   contrib/rddsql/sqlmix.c

+ added support to timestamp field type.
  You can now use "@" in DbCreate as the timestamp field type.
  Thanks to Grigory Filatov for fixing crash!
2024-12-18 21:55:59 -08:00
Aleksander Czajczynski
362b7a32de 2019-02-11 13:09 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* contrib/sddsqlt3/core.c
    ! fix DBUSEAREA() operation with SQLITE3 SDD to return empty result
      when query conditions are false or the source table has no rows.

      Previously an logically correct example caused RTE:
      DBUSEAREA(,, "SELECT * FROM existing_table WHERE FALSE")

    ! fix double-free error in sqLite3Disconnect(), looks like the
      sqlite3_close() return value checking was reverted, SQLITE_OK is 0

    * use CDP API to get UTF8 string length

    * use new sqlite3_prepare_v3() when built against
      sqlite 3.20.0 or upper (change borrowed from Viktor's 3.4 fork)

    + add HB_SQLT3_MAP_DECLARED_EMULATED define (not yet enabled by default)
      which make this SDD additionally parse SQLite column declarations.
      Right now it can make HB_FT_DATE fields working using standard
      ISO 8601 "yyyy-mm-dd" syntax. Also declarations not significant for
      SQLite, but useful in xBase-style programming - SQL numeric(len,dec)
      columns are detected in this mode and will be reflected in dbStruct().

    + add support for alternative StoD() like syntax for HB_FT_DATE columns

    + add support for ISO 8601 "YYYY-MM-DD HH:MM:SS.FFF" timestamp declared
      columns, SQLite stored strings are converted to proper HB_FT_TIMESTAMP
      fields

    + added HB_SQLT3_FIELDNAME_STRICT define, which enables shortening
      of field to "name" if SQLite returns "table.name". Such fields are
      not completly usable in xBase code - WA->T.FIELD syntax is not
      valid, but FieldPos("t.field") is OK. I think it should be default
      behaviour or some runtime setting should be introduced for convenience
      when working with specific SQL queries.

  * contrib/rddsql/sqlbase.c
  * contrib/rddsql/sqlmix.c
    + added ZAP functionality to SQLBASE and SQLMIX RDDs,
      index tags are preserved while ZAP-ing SQLMIX area.
      They are cleaned, no REINDEX is needed

    * changed to allow values of any type in "V" SIX3 / HB_FT_ANY fields
      in SQLBASE/SQLMIX RDD workareas

  * contrib/hbfoxpro/relfunc.c
    ! fix InList() FoxPro compatible function not looking at the last
      parameter passed. Thanks to Attila Szabo for the information
      posted on the developers list.
2019-02-11 13:10:05 +01:00
Viktor Szakats
ff3fbd8e40 core/contrib: whitespace/minor [ci skip] 2017-09-11 19:56:57 +00:00
Viktor Szakats
5a2a287752 2017-09-08 16:00 UTC Viktor Szakats (vszakats users.noreply.github.com)
* *
    * partial sync with the 3.4 fork codebase. These are the things
      synces for the most part:
      - copyright headers
      - grammar/typos in comments and some readmes
      - comment/whitespace/decorations
      - variable scoping in C files
      - DO CASE/SWITCH and some other alternate syntax usage
      - minimal amount of human readable text in strings
      - minor code updates
      - HB_TRACE() void * casts for pointers and few other changes to
        avoid C compiler warnings
      - various other, minor code cleanups
      - only Harbour/C code/headers were touched in src, utils, contrib,
        include. No 3rd party code, no make files, and with just a few
        exceptions, no 'tests' code was touched.
      - certain components were not touched were 3.4 diverged too much
        already, like f.e. hbmk2, hbssl, hbcurl, hbexpat
      - the goal was that no actual program logic should be altered by
        these changes. Except some possible minor exceptions, any such
        change is probably a bug in this patch.
      It's a massive patch, if you find anything broken after it, please
      open an Issue with the details. Build test was done on macOS.
      The goal is make it easier to see what actual code/logic was changed
      in 3.4 compared to 3.2 and to make patches easier to apply in both
      ways.
2017-09-08 16:25:13 +00:00
Viktor Szakats
9f16c2bf8e 2017-08-13 18:27 UTC Viktor Szakats (vszakats users.noreply.github.com)
* *
    * update copyright headers with new FSF postal address
    * COPYING.txt -> LICENSE.txt (rest of repo to be synced)
2017-08-13 18:38:59 +00:00
Mindaugas Kavaliauskas
6a6f4d962d 2016-08-10 20:12 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* contrib/rddads/ads.ch
    + 64bit server type constants included

  * include/dbinfo.ch
  * contrib/rddsql/hbrddsql.h
  * contrib/rddsql/rddsql.hbc
  - contrib/rddsql/hbrddsql.ch
    * definitions of SQL related RDDI_*, DBI_* constants moved from RDDSQL
      to core code
  * include/dbinfo.ch
  * contrib/rddsql/sqlbase.c
    * RDDI_NEWID renamed to more informative RDDI_INSERTID

  * contrib/rddads/ads1.c
  * contrib/rddads/adsfunc.c
  * contrib/rddads/rddads.h
    + RDDI_CONNECT, RDDI_DISCONNECT implemented. RDDINFO() can be used instead
      of RDD specific AdsConnect*() calls
    + other SQL related RDDINFO(), DBINFO() capabilities implemented
    + DBUSEAREA() accepts prefixes "SQL:" and "TABLE:" to indicate if
      given table name should be treated as SQL query or table file name.
      If these prefixes are omitted, function parameter is treated as table
      file name except in case it begins with "SELECT " (compatibility).
2016-08-10 20:13:37 +03:00
Viktor Szakats
58faf91453 2016-01-14 19:17 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
* *
    % remove brandings and homepage [1] from copyright header. Pass 1 - using script.
      [1] nobody has access to it anymore AFAIK - and it's also just
          a redirect since long
    ! update url in copyright header
    ; this should make the diff between 3.4 and 3.2 easier to manage
2016-01-14 19:18:17 +01:00
Przemysław Czerpak
5ac8fc0d4a 2015-02-25 22:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbodbc/odbc.c
  * contrib/hbodbc/sql.ch
    * minor formatting to sync with Viktor's branch
    + added missing defines from Viktor's branch

  * contrib/rddads/ads.ch
  * contrib/rddads/adsfunc.c
    + added AdsStmtSetTableReadOnly( <nMode> ) -> <lSuccess>
      (From Viktor's branch: 2015-01-21 18:43 UTC+0100 Viktor Szakats)
    + added ADS_REFRESHCOUNT constant and
         AdsGetRecordCount( [<nHandleType:ADS_TABLE>], ;
               [<nFilterOption:ADS_RESPECTFILTERS>], @nCount ) -> <nErrorCode>
      (From Viktor's branch: 2014-01-19 13:42 UTC+0100 Viktor Szakats)
    ! fixed connection handle parameter position in AdsDDRemoveTable()
      It was 4-th:
         AdsDDRemoveTable( <cTableName>, <deleteFile>, , [ <nConnection> ] )
               -> <lResult>
      Now is 3-rd:
         AdsDDRemoveTable( <cTableName>, <deleteFile>, [ <nConnection> ] )
               -> <lResult>
      (From Viktor's branch: 2014-01-14 23:53 UTC+0100 Viktor Szakats)

  * contrib/rddads/rddads.h
    + autodetection support for 11.10
      (From Viktor's branch: 2013-12-26 01:22 UTC+0100 Viktor Szakáts)

  * contrib/rddads/adsx.c
    * use hb_xgrabz()
    * formatting

  * contrib/rddsql/hbrddsql.h
  * contrib/rddsql/sqlbase.c
    * added const qualifier to SDD method pointer in SQLBASEAREA
    * declare default SDD method table with const qualifier
    * added s_ prefix to the name of static variable with SDD methods
    % optimized GOHOT() method
    * use hb_xgrab() instead of hb_xalloc() to force error when out of memory
    * use hb_xgrabz()

  * contrib/rddsql/sqlmix.c
    * use hb_xgrabz()

  * contrib/sddfb/core.c
    * added s_ prefix to the name of static variable with SDD methods
    % removed unnecessary memset()
    % optimized GOTO() method
    ! fixed very bad typo in record set resizing - for each record 64 dummy
      items were added to array with records so finally this array was 64
      times longer then necessary.

  * contrib/sddmy/core.c
    * added s_ prefix to the name of static variable with SDD methods
    + added new field types from from Viktor's branch
    * use hb_xgrabz()
    % removed redundant comparison to NULL

  * contrib/sddoci/core.c
    * added s_ prefix to the name of static variable with SDD methods
    * check OCI_Initialize() result and generate error if fails
      (synced with Viktor's branch)
    * minor formatting to sync with Viktor's branch
    % removed unnecessary memset()
    % optimized GOTO() method
    ! fixed very bad typo in record set resizing - for each record 64 dummy
      items were added to array with records so finally this array was 64
      times longer then necessary.

  * contrib/sddodbc/core.c
    * replaced unnecessary hb_xgrabz() with hb_xgrab()
    ! fixed very bad typo in record set resizing - for each record 64 dummy
      items were added to array with records so finally this array was 64
      times longer then necessary.

  * contrib/sddpg/core.c
    * added s_ prefix to the name of static variable with SDD methods
    * use hb_xgrabz()

  * contrib/sddsqlt3/core.c
    * added s_ prefix to the name of static variable with SDD methods
    * minor formatting to sync with Viktor's branch
    ! fixed memory leak when RTE ESQLDD_STMTALLOC is generated
      (fix from Viktor's branch)
    % removed unnecessary memset()
    ! fixed very bad typo in record set resizing - for each record 64 dummy
      items were added to array with records so finally this array was 64
      times longer then necessary.
2015-02-25 22:06:51 +01:00
Przemysław Czerpak
ef962484be 2014-10-24 15:15 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbrddntx.h
  * src/rdd/workarea.c
  * src/rdd/dbf1.c
  * src/rdd/delim1.c
  * src/rdd/sdf1.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/dbffpt/dbffpt1.c
  * contrib/rddads/ads1.c
  * contrib/rddads/adsfunc.c
  * contrib/rddads/adsx.c
  * contrib/rddsql/sqlbase.c
  * contrib/rddsql/sqlmix.c
  * contrib/sddfb/core.c
  * contrib/sddmy/core.c
  * contrib/sddoci/core.c
  * contrib/sddodbc/core.c
  * contrib/sddpg/core.c
  * contrib/sddsqlt3/core.c
    * cleaned AREAP casting
    * unified some variable names
    * cleaned some DBOI_* actions
    * allow to call ORDERINFO() method without itmResult item.
    * few other cleanups
2014-10-24 15:15:39 +02:00
Przemysław Czerpak
62478c5657 2014-10-03 16:03 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/wafunc.c
    % use dynamic symbol pointer to find field index

  * src/rdd/workarea.c
    * set default maximum field size to HB_SYMBOL_NAME_LEN characters
      (by default in Harbour builds HB_SYMBOL_NAME_LEN is 63)
      Some RDDs may set longer names but it will be respected only by
      FieldName() function and in all other cases only HB_SYMBOL_NAME_LEN
      characters is significant for Harbour so such decision should be
      well thought by RDD authors because it may confuse users.
      Warning: all 3-rd party RDDs which need to force shorter names
               should update uiMaxFieldNameLength in their NEW() method
               just after SUPER_NEW() call, i.e. like in core DBF RDD.
    ! respect uiMaxFieldNameLength when new fields are added

  * src/rdd/dbf1.c
    * set maximum field size to 10 characters

  * contrib/rddsql/sqlbase.c
    - removed code used to set uiMaxFieldNameLength to HB_SYMBOL_NAME_LEN.
      Now it's default field length value for each RDD unless it does not
      change it.

  * contrib/rddads/ads1.c
    * minor modification in adsFieldName()

  * contrib/hbwin/wapi_winbase.c
    + added support for FORMAT_MESSAGE_ALLOCATE_BUFFER and 6-th <nSize>
      parameter to wapi_FormatMessage() function. The 6-th <nSize> parameter
      has higher priority then size of string passed in the 5-th parameter.
    ! fixed potential memory leak
2014-10-03 16:03:55 +02:00
Przemysław Czerpak
ea6a21685d 2014-09-23 10:47 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/rddsql/sqlbase.c
    ! set maximum field size to HB_SYMBOL_NAME_LEN

  * ChangeLog.txt
    * removed TABs and format some of recent entries
2014-09-23 10:47:27 +02:00
vszakats
9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00
vszakats
a4a357a18b 2013-03-15 11:12 UTC+0100 Viktor Szakats (harbour syenar.net)
* /harbour/* -> /*
    * moved whole Harbour source tree one level up to
      avoid single 'harbour' top dir
2013-03-15 11:13:30 +01:00