Clipper On Line • Ver Tópico - Atualizações do Letodbf

Atualizações do Letodbf

Discussão sobre Banco de Dados e RDDs para Clipper/[x]Harbour.

Moderador: Moderadores

 

Atualizações do Letodbf

Mensagempor Itamar M. Lins Jr. » 27 Jun 2018 18:06

Ola!
Todos os erros reportados foram corrigidos.
Nota para o SKIP(0) fazer um commit na base de dados.

/* Encoding: UTF-8 (No BOM)  Notation (in 5th position):
     * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/

2018-06-27 18:00 UTC+0100 Rolf 'elch' Beckmann (elchs users.noreply.github.com)
  * include/rddleto.ch
  * source/client/leto1.c
    + RDDI_CLEARBUFFER for RDDInfo: discard skip-buffer of all WA and
      refresh record-buffer with a skip( 0 )
    * add to refresh record buffer with a skip( 0 ) in DBI_CLEARBUFFER
    + leto_RelOptimized() ..
    ! .. for check all relationed WA are optimized in filter and relations;
      used in Leto_DbEval()

2018-06-26 19:50 UTC+0100 Rolf 'elch' Beckmann (elchs users.noreply.github.com)
  * source/client/leto1.c
    + add PRG functions LETO- _TABLELOCK, _TABLEUNLOCK for client side;
    * universalize LETO- _RECLOCK, _RECUNLOCK to handle also non-LETO WA
    + leto_LockValidate()
      automatic replace in Leto_DBEval() expression Harbour lock functions
      with LETO variants -- validate made lock is unlocked:
      rlock()/ dbrlock() => Leto_RecLock(); dbrunlock() => Leto_RecUnlock()
      flock() => Leto_TableLock(); dbunlock() => Leto_TableUnlock()

  * source/client/rddsys.prg
    * add REQUESTs for LETO- _TABLELOCK, _TABLEUNLOCK

  * Readme.txt
    * a straying bracket :-(

2018-06-25 22:42 UTC+0100 Rolf 'elch' Beckmann (elchs users.noreply.github.com)
  * source/client/leto1.c
  * source/server/letofunc.c
    ! don't set <nNext> value -1, esp. not for non-LETO RDD method,
      instead check if param is given numeric -- similar for <nRec>
    * accept and go-to any given <nRecord> in leto_dbEval()
    * simplify two 'if' into one
    * tiny MsVc warning, as dbLockInfo.fResult is a HB_USHORT

2018-06-25 01:11 UTC+0100 Rolf 'elch' Beckmann (elchs users.noreply.github.com)
  * source/client/leto1.c
  * source/server/letofunc.c
    ! remove test, if <cbFor> and <cbWhile> return a boolean value:
      it would need to transmit 2 numeric params as in real usage,
      and may distract a logic in the CB, if its called the first time;
      so blocks can even return numeric values, analysed by hb_itemGetL()
    ! (hopefully) fixed GoTop behaviour with <cbWhile>

2018-06-24 18:58 UTC+0100 Rolf 'elch' Beckmann (elchs users.noreply.github.com)
  * include/leto_std.ch
    + add optional 'INTO variable' option for delete and recall commands,
      will contain number of records processed.
    + add translate DbEval() => Leto_DBEval()

  * source/client/rddsys.prg
  * source/client/leto1.c
    + RDDI_LOCKRETRY as recommended constant for LetoDBf RDDI_LOCKTIMEOUT
    + add PRG functions LETO- _RECLOCK, _RECUNLOCK for client side;
      Leto_RecUnlock() return boolean if R-locked before
      add REQUESTs for these ( as possible only literally used in source )
  * source/server/letofunc.c
    % make <nNext> starting at active record depending on <lRest>, likely
      for <bWhile>: explicit given FALSE starts at table top (filter <bFor>)
    - remove to convert 'stringified' params nNext, nRec, lRest ...

  * source/server/letofunc.c
    ! server side auto-locking in leto_dbEval() to follow letodb.ini option
      Share_Tables; use server internal lock-functions instead 'real' locks
    % try an initial F-lock in leto_DbEval() if given 10th param <lStay> is
      given as non default: HB_FALSE
    * return boolean in Leto_RecUnlock(), -TableUnlock() if locked before

  * Readme.txt

2018-06-22 10:42 UTC+0100 Rolf 'elch' Beckmann (elchs users.noreply.github.com)
  * source/client/letocl.c
  * source/server/letofunc.c
    ! no DBGoTop() in letoEval()/ leto_dbEval() *if* given <while> condition
      ; THANKS Mario for pointing at misbehaviour
    ! check for <lNext> before above, start also at current record
    ! fix an ALIAS problem in leto_FindAlias() for server mode No_Save_WA=0
      when replacing universal 'field->' alias
    + boolean 10th param to Leto_DbEval() to stay at last processed record or
      goto back to the one when starting
    * move handling to go back to record as before out of letoEval() into
      Leto_DbEval(); then DbEval() can perform Harbour conform.
      move leto_PutRec() from here into letoEval()

2018-06-18 18:56 UTC+0100 Rolf 'elch' Beckmann (elchs users.noreply.github.com)
  * include/funcleto.h
  * include/leto_std.h
  * source/client/leto1.c
  * source/client/letocl.c
    % if DbRUnlock( nRecno ) is active record to update, add unlock to update
      like for DbUnlock()
    ! leto_dbEval() in data change mode need to call RDD method FieldPut()
      when executed at client, to set markers which fields to update;
      PP fill into FieldPut('fieldname'), leto_DbEval() convert to fieldpos
    + flag LETO_FLAG_UPD_ALL to update all non-extern stored fields
    * send outstanding updated record before to start leto_dbeval()
    * add numeric constant alternative to 2. param in Leto_DbDriver()

  * source/client/rddsys.prg
    * add function requests used in Leto_DbEval()

  * source/server/letofunc.c
    ! server mode No_Save_WA=0; ! NTX, AUTORDER == 0; then re-open production
      or open another index bag: missing set order to first in bag
      ; Thanks! to Theo for pointing bug for rare usage
    % leto_dbEval() in lock-mode: inital try one F-lock, if fails R-locks

2018-06-15 18:48 UTC+0100 Rolf 'elch' Beckmann (elchs users.noreply.github.com)
  ; ( maybe rare used ) bug fixes ! -- refresh server and client for news:
    # support named ( LETO extension ) and OS none-named temporary tables
    # server-side executable ( by stingified codeblocks <for> and <while> )
      'record processing commands' with new header file "leto_std.ch"
    # transactions: ignore-to-unlock until commit' mode for easy integration
      to existing source with 'unlocks'
    # RDDI_AUTOLOCK in conjunction with a timeout value to get lock success,
      used in leto_DbEval() for shared opened tables -- whereas leto_DbEval()
      is fast server side query [opt. data change] into a sum or resultset!
    # performance for sequence: Rlock(); change data; DbUnlock()
      spares a network package ( 'unlock' send together with data update )

  * letodb.hbc
  + include/leto_std.h
  * include/letocl.h
  * include/rddleto.ch
  * include/rddleto.h
  * source/client/leto1.c
    + new LETO_*:
      _DBARRANGE, _DBSORT, _DBCOPY, _DBAPP, _DBJOIN, _TOTAL, _UPDATE
      LetoDBf adapted/ optimized replicas of __db*() functions
    * + prep up! LETO_DBEVAL() to act at server if ever possible,
      to be a full replace for dbEval() *plus* LetoDBf extensions like
      to give back result-sets, using Leto_Var*(), AUTOLOCKing, ...
    * refine letoSort() and letoTrans() to use 'fOptimized' flag;
      do not send non-optimzed query ( with 'for/while'-codeblocks ! ),
      and instead execute it (must be) local at client.
      With string expressions for the evil-block, the for/while' expression,
      its tried as optimized at server -- if query then fails at server,
      - a local var or function in it - its tried at client ( if here the
        expressions are valid as a CB )
    ; General aim is to let Leto_Db*() functions act at server-side,
      very wanted for exactly case to 'filter' records at the bright! side.
      HB core functions __db*() omit the string alternative,
      and expressions are blockyfied in 'std.ch', so ...
    * use new header file to pre-process Harbour __db*() commands
      ( by stringify their params ) into Leto_db*() variants
    * include new header 'leto_std.ch' in letodb.hbc
    * refine leto_mkCodeBlock() used in above
    + new LETO DBI_CHILDPARENT to check if a relation points to this WA
    + use DBI_ISTEMPORARY to set new flag in WA; return HB_SUCCESS
    + Leto_DbCreateTemp() to create 'temporary' tables, aka automatically
      deleted when closed. Without given filename, a unique file in the
      temporary OS path at server is created, else with given name relative
      to the server datapath. [ "mem:/temptable" without path in RAM ]
    + Leto_BeginTransaction( .T. ) [ given TRUE ]: not only all existing locks
      are unlocked, but following R-F-unlocks ignored until transaction end.
      This should it make easy to add transactions to existing source.
    * LetoDbAppend() during transaction ever to use: fUnLockAll = .F.
    + leto_Var[Decr|Incr](): optional increment amount as 4th param,
      so nice to sum up a value with e.g. flag: LETO_VCREAT
    + new RDDI_LOCKTIMEOUT, add RDDI_AUTOLOCK, changed Leto_SetLockTimeOut()
      to set value also at server

  * source/client/letomgmt.c
    + new LETO_FTS( [ cSearch[, lCaseInsensitive, [ lNoMemos ] ] ] )
      Full-Text-Search over all fields, default including also memofields

  * source/client/letocl.c
    ! more fix to 2017-06-09, LetoDbGoTo():
      instead looking up the cache for recno() > reccount() [out of space],
      ask the server for fresh data; ( sets in return also EOF/ BOF );
      THANKS for hint by Leon; -- reset 'found' flag to false in any! case
    ! fix data refresh: if DbRlock() not the active record,
      and its data is cached in (still) valid skipbuffer
    * minor add of field-types

  * source/client/rddsys.prg
    * link HB internal funtions needed in leto_std.ch

  * include/srvleto.h
  * source/server/letofunc.c
  * source/server/server.prg
    + LETO_FTS() Full-Text-Search *all* fields, well for filter expressions
    ! fix to set from client a table trigger at server with DBI_TRIGGER
      ; a global server trigger ever have precedence, then do not set
    ! possibility to create temporary tables, deleted with closing them.
      Likely a DbCreate() with lKeepOpen flag, ever in 'exclusive' mode.
    * rework also server side part of leto_DbEdit(), and add same for
    + leto_dbJoin(): accepts named/ unnamed temporary table
    + new RDDI_LOCKTIMEOUT to query/ set a session iLockTimeOut,
      used in conjunction with added RDDI_AUTOLOCK in e.g. Leto_DbEval()
    * add a server name known to itself, existing config option 'SERVER'
    * add missing REQUESTs for Leto_Var[Inc|Dec]

  * source/server/letovars.c
    * make leto_VarIncr()/ leto_VarDevr() work also with decimals
    ! fix to create above from server side
    + optional given amount to increment or decrement -- if not given: '1'

  * tests/c_lang/test_dbf.c
    * new temporary param for LetoDbCreateTable()

  * tests/test_tr.prg
    * clean up of code which went into rddleto library

  * Readme.txt

2018-05-14 19:18 UTC+0100 Rolf 'elch' Beckmann (elchs users.noreply.github.com)
  * include/letocl.h
    * move #define LETO_DEFAULT_TIMEOUT from letocl.c

  * source/client/leto1.c
    ! re-set WA flags [EOF/BOF/FOUND] in letoOrderCreate(),
      e.g. clear an old EOF() flag -- bug-report by Itamar, THANKS !!
    * remove a doubled, obsolete WA set-flag in letoOrderListAdd()
    * clean up of function letoRddInfo():
      centralize pConnection determination, dissolve leto_MemoExt() herein;
      use connection pointer ( not ID ) as param for leto_MemoType() and
      leto_MemoBlocksize()
    * add experimental <iLockTimeOut> as optional 8th param of
      LETO_RECONNECT() [ in ms, temporary used for lock restore ]

  * source/client/letomgmn.c
    * change default in LETO_CONNECT() to LETO_DEFAULT_TIMEOUT ( 120 s )
      if timeout is given apply it also for an ready established connection;
      where nTimeOut '< 0' == -1 == infinite, '0' == LETO_DEFAULT_TIMEOUT
    * verify in Leto_VarExprCreate() a not aliased ( M-> or MEMVAR-> )
      memvar is not *also* a fieldname in active LETO workarea;
      take care of such memvar prefix to be removed in result

  * source/client/letocl.c
    ! fix compile time LETO_PASSWORD is verified for new connection
      in leto_RecvFirst() --> LETO_ERR_ACCESS
    * dissolve leto_NetName() into LetoConnectionOpen()
    * leto_RecvFirst():
      move a section out of LetoConnectionOpen() which belongs here;
      use initial timeout <default>: 6 s to establish a new connection
      ( else given_value in range: 100  <=> LETO_DEFAULT_TIMEOUT/10 [12 s] )

  * source/server/leto_2.c
  * source/server/letofunc.c
    * delete existing log earlier, just after connect ( leto_wUsLogDelete() )
      to possible log the 'intro' greating string for highest debug levels
    * increase a buffer

  * source/server/server.prg
  * Readme.txt
    * change default GT for all modes to: HB_GT_NUL, and remove ( mostly
      failure ) feedback as gone with immediate closing window
      ; this will not prevent a black-screen window created by Windows OS;
        to avoid use 'start /B' or similar ( see Readme.txt: 3.1 )


Saudações,
Itamar M. Lins Jr.
Avatar de usuário

Itamar M. Lins Jr.
Colaborador

Colaborador
 
Mensagens: 3258
Data de registro: 30 Mai 2007 11:31
Cidade/Estado: Ilheus Bahia
Curtiu: 92 vezes
Mens.Curtidas: 142 vezes

Atualizações do Letodbf

Mensagempor fladimir » 28 Jun 2018 15:22

Top!

Vlw Itamar.
Sun Tzu há mais de três mil anos cita nas epígrafes de seu livro “A Arte da Guerra“:

“Concentre-se nos pontos fortes, reconheça as fraquezas, agarre as oportunidades e proteja-se contra as ameaças”.
“Se não é vantajoso, nunca envie suas tropas; se não lhe rende ganhos, nunca utilize seus homens; se não é uma situação perigosa, nunca lute uma batalha precipitada”
.


DESKTOP CONSOLE Harbour 3.4.0dev (4541270) (2016-06-28 07:05) | Console | MINGW | DBF | CDX | FastReport | MySQL
DESKTOP VISUAL... Harbour 3.2 | MinGW | Xailer 4.0.2 | MariaDB Nativo | Outros via ADO | FastReport
MOBILE Android/IOS e WEB - Outros
Avatar de usuário

fladimir
Colaborador

Colaborador
 
Mensagens: 2151
Data de registro: 15 Nov 2006 19:21
Curtiu: 16 vezes
Mens.Curtidas: 104 vezes

Atualizações do Letodbf

Mensagempor asimoes » 19 Jul 2018 08:16

As últimas atualizações do LetoDbf estão com warnings na compilação:
hbmk2: Harbour: Compilando módulos...
hbmk2: Compilando recursos...
hbmk2: Compilando...
../../../../source/server/letofunc.c: In function 'leto_dbEvalJoinAdd':
../../../../source/server/letofunc.c:7445:39: warning: ?: using integer constants in boolean context [-Wint-in-bool-context]
       if( s_iDebugMode > ! bValid ? 0 : 20 )
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
../../../../source/server/letofunc.c: In function 'HB_FUN_LETO_DBEVAL':
../../../../source/server/letofunc.c:8230:37: warning: ?: using integer constants in boolean context, the expression will always evaluate to 'true' [-Wint-in-bool-context]
       if( s_iDebugMode > bValid ? 1 : 20 )
           ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar de usuário

asimoes
Colaborador

Colaborador
 
Mensagens: 3800
Data de registro: 26 Abr 2007 16:48
Cidade/Estado: RIO DE JANEIRO-RJ
Curtiu: 219 vezes
Mens.Curtidas: 164 vezes

Atualizações do Letodbf

Mensagempor asimoes » 19 Jul 2018 10:42

Coloquei essa mensagem lá no GIT vou aguardar...
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar de usuário

asimoes
Colaborador

Colaborador
 
Mensagens: 3800
Data de registro: 26 Abr 2007 16:48
Cidade/Estado: RIO DE JANEIRO-RJ
Curtiu: 219 vezes
Mens.Curtidas: 164 vezes

Atualizações do Letodbf

Mensagempor Itamar M. Lins Jr. » 19 Jul 2018 17:26

Já tinha visto, penso que ela está sabendo...Esta sob teste esses avisos.
Se ele continuar com essas melhorias, vamos rodar sintaxe SQL no DBF, o Pritpal já fez isso, mas não sei quem usa.
  * hbqtwidgets/scripts.prg
    + Implemented: Using Harbour expressions in any of the SELECT fields,
       be it aggregate field - COUNT, MIN, MAX, AVG, SUM
       or value field - SUBSTR, LEFT, RIGHT, LOWER, UPPER
       or non-SQL-compliant value field FUNC (examples below).

    + Extended: INTO clause to save result as Excel compliant .csv file.
       This is in addition to saving result as a .dbf file. The type is
       determined by the extention of file provided through INTO clause.
   
    + Extended: SELECT fields can contain parenthesis.

    ; Until now Harbour's SQL query looks like
                                                                Clause Order
       SELECT   <* | ListOfFieldsSeperatedByComma> ;                 1     Mandatory
       FROM     <[cDriver|]cFullyQualifiedTableName> ;               2     Mandatory
       INTO     <cFullyQualifiedDbf|CsvFilenameWithExtention> ;      v     Optional
       ORDER BY <ListOfFieldNamesProvidedInSELECTseparatedByComma> ; v     Optional
       GROUP BY <ListOfFieldNamesProvidedInSELECTseparatedByComma> ; v     Optional
       WHERE    <ConditionsComparingFieldsInTheTableWithSomeValue> ; LAST  Optional

    ; Examples:
       SELECT   age, state, Func(age*salary/2), Func(Right(state,1)+Left(State,1)), Count(*) ;
       FROM     C:\harbour\tests\test.csv ;
       GROUP BY age,state ;
       ORDER BY age-desc,state ;
       WHERE    age > 66

    ; WHERE clause totally rely on fieldnames and literal values and only "AND" clause.

  + hbqtwidgets/parselogs.prg
  + hbqtwidgets/parselogs.ui
  + hbqtwidgets/expandtext.ui
  * hbqtwidgets/hbqtwidgets.hbp
    + Added: A self contained class to analyze application logs - of any kind - almost.

  ; Presenting HbQtLogAnalyzer() - A Tool to Analyze Logs in a Variety of Ways

    ; The Background:
       At Curacao, a shade less than 1000 users/terminals remains on for the
       best part of the day, spreading accross different cities and locations,
       all accessing the same business application. Usually users do not report
       if any error is generated. For days it goes on unnoticed until reported
       or looked into error logs regularly. Even looking into error logs does
       not yield accurate state of things.

       This motivated me to develop a tool, from Harbour's point-of-view specifically,
       which could provide enough insite into the state of errors, and from
       different angels. Initially I started with our standatd errorlog,
       but soon realized that with some little more effort it can be a generic
       tool. That little effort resulted in HbQtLogAnalyzer() class, which to my
       amazement, could parse all other logs generated in our organization. And
       I am sure that this tool will be good for any type of log generated
       from any language, machine, or server.

    : How to implement in your application:

       WITH OBJECT oAnalyzer := HbQtLogAnalyzer():new( oParent ):create()
          :loadConfiguration( hb_DirBase() + "errors.hlg" )
          :loadLog( hb_DirBase() + "errors12.16" )
       ENDWITH
       // Provide a container to LogAnalyzer widget
       //
       oParent:layout():addWidget( oAnalyzer:widget() )
     
    : The Interface:
       LEFT Pane:
        TreeView containing all the entries in the log chronologically.
        Each entry is serialized and depicted with the <Description> field
        defined in the log definition. The child node of each entry contains
        all other fields defined in the definition.

       RIGHT Pane:
        A context sensitive toolbar at the top - TOP-TOOLBAR:
        .
        ToolButton - Paste selection on clipboard.
         This button is active when ANALYSIS tab is in focus.
         Copies the contents of selected fields and rows on clipboard.

        ToolButton - Save selection as .csv file.
         This button is active when ANALYSIS tab is in focus.
         Opens a FileSave dialog to fetch the .csv filename, then
         Saves the contents of selected fields and rows in a provided .csv file.

        A Tab Widget at the bottom containing following tabs:
        .
        ANALYSIS  : Contains a table widget containing field values of log entries.
        SUMMARIES : Contains a tree-view at the top depicting summaries of entries
                    grouped by fields defined to be analyzed.
        CONFIGURE : An interface to define definition files for each type of
                    log you intend to analyze. A very intuitive and powerful   
                    definition writer.

        ( SEEMS the textual help as above will not be useful, so I will post on
          QtContribs site at source-forge some detailed GUI aided pages which will
          demonstrate how to use this tool to the best of your advantage.
       
        Infact, I wanted to present this tool to you as a new year gift for 2017
        but on 31st I fell sick and it took me a while to recover. So, please
        accept it as originally intended. )       


Isso tem lá na QtContribs! Parece que teremos no Letodbf.
No Changelog.txt do LetoDBf...
+ adding SQL JOIN types ( 'set theory' ) to Leto_DbEval()
;test phase!, it have to prove its working,
use this extension! to Leto_DbEval() still not for production usage
;ToDo: explain how to test ;-)
+ add Leto_DbLocate() and RDD method letoLocate()
;for optimized WA it calls a LetoDbEval() to LOCATE at server-side
;by intention no PP-rule for LOCATE command in leto_std.ch
! fix for last update: logic to preserve the skipbbuffer was wrong in
LetoDbEval(); also hardened to handle some NULL pointers

Por isso deixei quieto...

Saudações,
Itamar M. Lins Jr.
Avatar de usuário

Itamar M. Lins Jr.
Colaborador

Colaborador
 
Mensagens: 3258
Data de registro: 30 Mai 2007 11:31
Cidade/Estado: Ilheus Bahia
Curtiu: 92 vezes
Mens.Curtidas: 142 vezes

Atualizações do Letodbf

Mensagempor asimoes » 19 Jul 2018 19:16

Maravilha Itamar,
Boas notícias.
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar de usuário

asimoes
Colaborador

Colaborador
 
Mensagens: 3800
Data de registro: 26 Abr 2007 16:48
Cidade/Estado: RIO DE JANEIRO-RJ
Curtiu: 219 vezes
Mens.Curtidas: 164 vezes




Retornar para Banco de Dados

Quem está online

Usuários vendo este fórum: Google [Bot] e 1 visitante


Faça uma doação para o forum
cron
v
Olá visitante, seja bem-vindo ao Fórum Clipper On Line!
Efetue o seu login ou faça o seu Registro