1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

orm: add initial pg support (#9827)

This commit is contained in:
Louis Schmieder
2021-04-25 17:57:55 +02:00
committed by GitHub
parent fc3b628440
commit 7184629969
8 changed files with 263 additions and 50 deletions

View File

@@ -11,6 +11,8 @@ import io
// PostgreSQL Source Code
// https://doxygen.postgresql.org/libpq-fe_8h.html
#include <libpq-fe.h>
// for orm
#include <arpa/inet.h>
pub struct DB {
mut:
@@ -59,7 +61,7 @@ fn C.PQexecParams(conn voidptr, command byteptr, nParams int, paramTypes int, pa
fn C.PQputCopyData(conn voidptr, buffer byteptr, nbytes int) int
fn C.PQputCopyEnd(voidptr, int) int
fn C.PQputCopyEnd(voidptr, &byte) int
fn C.PQgetCopyData(conn voidptr, buffer &byteptr, async int) int