Olá!
The ORM acronym stands for Object Relational Mapper. ORMs are a method to access and manipulate data using objects, instead of direct access to SQL backends or other data stores.
https://github.com/EricLendvai/Harbour_ORM
Já está funcional!
Para MariaDB/MySQL e PostgreSQL
Saudações,
Itamar M. Lins Jr.
Harbour ORM
Moderador: Moderadores
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 8028
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 2 vezes
- Curtiram: 1 vez
- JoséQuintas
- Administrador

- Mensagens: 20415
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
- Curtiram: 1 vez
Harbour ORM
DbCreate(::p_CursorName,l_Structure,'SQLMIX',.T.,::p_CursorName,,"UTF8")
Achei que ia ser interessante...select (l_select)
Mas vendo isso.... sei lá...
Talvez alguém pudesse dar uma olhada em VBMySQLDirect, é um fonte pra usar a DLL do MySQL como se fosse ADO, mas usando apenas a DLL.
Esse negócio de trabalhar igual DBF não dá certo.
Nota: apesar que agora parece difícil achar o fonte, devo ter em CDs antigos aqui.
José M. C. Quintas
Harbour 3.2, mingw, multithread, gtwvg, fivewin 25.12, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui), (hmg3), (hmg extended), (oohg), PNotepad, ASP, (Linux/Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, multithread, gtwvg, fivewin 25.12, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui), (hmg3), (hmg extended), (oohg), PNotepad, ASP, (Linux/Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 8028
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 2 vezes
- Curtiram: 1 vez
Harbour ORM
Olá!
Ele usa comandos do VFP, não viu os exemplos ?
...
Apenas não perdeu tempo reinventando a roda, usa o SQLMIX para trazer o resultado. Não tem nada de DBF.
Saudações,
Itamar M. Lins Jr.
PRÉ CONCEITO!Esse negócio de trabalhar igual DBF não dá certo.
Ele usa comandos do VFP, não viu os exemplos ?
Código: Selecionar todos
oSQLConnection1 := hb_SQLConnect()
with object oSQLConnection1
:SetBackendType("MariaDB")
:SetUser("root")
:SetPassword("rndrnd")
:SetDatabase("test001")
// :SetServer("127.0.0.1")
iSQLHandle := :Connect()
do case
case iSQLHandle == 0
?"Already Connected"
case iSQLHandle < 0
? :GetLastErrorMessage()
otherwise
?"connection is",iSQLHandle
endcase
?"MariaDB Get last Handle",:GetHandle()
Código: Selecionar todos
REQUEST HB_CODEPAGE_UTF8
REQUEST SQLMIX , SDDODBC
#define HB_ORM_CURSOR_STRUCTURE_POS 1
#define HB_ORM_CURSOR_STRUCTURE_TYPE 2
#define HB_ORM_CURSOR_STRUCTURE_LEN 3
#define HB_ORM_CURSOR_STRUCTURE_DEC 4
#define HB_ORM_CURSOR_STRUCTURE_NULL 5
#define HB_ORM_CURSOR_STRUCTURE_AUTOINC 6
#define HB_ORM_CURSOR_STRUCTURE_BINARY 7
#define HB_ORM_CURSOR_STRUCTURE_TRIM 8
#define HB_ORM_CURSOR_STRUCTURE_UNICODE 9
#define HB_ORM_CURSOR_STRUCTURE_COMPRESS 10
//=================================================================================================================
class hb_orm_Cursor
hidden:
data p_CursorName init ""
data p_Fields init {=>} //Key is the FieldName, {cFieldType,nFieldLen,nFieldDec,lAllowNull,lIsAutoIncrement,lBinary,lTrimmed,lUnicode,lCompressed}
//Using flags for the extended attributes for performance reason mainly
data p_AutoIncrementLastValue init 0 //If more than one field is marked as AutoIncrement, the value will be unique across all of them.
data p_FieldsForAppend init {} //To make it faster during AppendBlank(), since only care to process certain fields
data p_Indexes init {=>} //Key is the TagName, {cExpression,lUnique}
// Future plans: {cExpression,lUnique,cDirection ("A"scending/"D"esending),cForExpression}
method UpdateRecordCount() /
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 8028
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 2 vezes
- Curtiram: 1 vez
Harbour ORM
Olá!
Alias SQLMIX não tem nada de DBF.
Se ele colocasse a extensão do resultado ResultSet_Array, dava no mesmo.
No fim só podemos usar comandos SQL para ler e gravar. Já falei sobre isso N vezes.
Saudações,
Itamar M. Lins Jr.
Alias SQLMIX não tem nada de DBF.
Se ele colocasse a extensão do resultado ResultSet_Array, dava no mesmo.
No fim só podemos usar comandos SQL para ler e gravar. Já falei sobre isso N vezes.
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
- JoséQuintas
- Administrador

- Mensagens: 20415
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
- Curtiram: 1 vez
Harbour ORM
Enquanto ainda uso Windows, vou só de ADO mesmo.
Código: Selecionar todos
cnSQL := win_OleCreateObject( "ADODB.Connection" )
cnSQL:ConnectionString := "blablabla"
cnSQL:Open()
Temp := cnSQL:Execute( "SELECT ... FROM ..." )
DO WHILE ! Temp:Eof()
Temp:MoveNext()
ENDDO
Temp:Close()
cnSQL:Close()
José M. C. Quintas
Harbour 3.2, mingw, multithread, gtwvg, fivewin 25.12, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui), (hmg3), (hmg extended), (oohg), PNotepad, ASP, (Linux/Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, multithread, gtwvg, fivewin 25.12, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui), (hmg3), (hmg extended), (oohg), PNotepad, ASP, (Linux/Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/