Skip to content
This repository was archived by the owner on Nov 11, 2022. It is now read-only.

Commit 359a4e9

Browse files
author
Elliot Shepherd (CI)
committed
[auto] update packaged drivers [skip ci]
1 parent 7ac9050 commit 359a4e9

16 files changed

+1134
-0
lines changed

mssql/graal_isolate.h

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#ifndef __GRAAL_ISOLATE_H
2+
#define __GRAAL_ISOLATE_H
3+
4+
/*
5+
* Structure representing an isolate. A pointer to such a structure can be
6+
* passed to an entry point as the execution context.
7+
*/
8+
struct __graal_isolate_t;
9+
typedef struct __graal_isolate_t graal_isolate_t;
10+
11+
/*
12+
* Structure representing a thread that is attached to an isolate. A pointer to
13+
* such a structure can be passed to an entry point as the execution context,
14+
* requiring that the calling thread has been attached to that isolate.
15+
*/
16+
struct __graal_isolatethread_t;
17+
typedef struct __graal_isolatethread_t graal_isolatethread_t;
18+
19+
#ifdef _WIN64
20+
typedef unsigned long long ulong;
21+
#else
22+
typedef unsigned long ulong;
23+
#endif
24+
25+
26+
/* Parameters for the creation of a new isolate. */
27+
enum { __graal_create_isolate_params_version = 1 };
28+
struct __graal_create_isolate_params_t {
29+
int version; /* Version of this struct */
30+
31+
/* Fields introduced in version 1 */
32+
ulong reserved_address_space_size; /* Size of address space to reserve */
33+
};
34+
typedef struct __graal_create_isolate_params_t graal_create_isolate_params_t;
35+
36+
#if defined(__cplusplus)
37+
extern "C" {
38+
#endif
39+
40+
/*
41+
* Create a new isolate, considering the passed parameters (which may be NULL).
42+
* Returns 0 on success, or a non-zero value on failure.
43+
* On success, the current thread is attached to the created isolate, and the
44+
* address of the isolate and the isolate thread are written to the passed pointers
45+
* if they are not NULL.
46+
*/
47+
int graal_create_isolate(graal_create_isolate_params_t* params, graal_isolate_t** isolate, graal_isolatethread_t** thread);
48+
49+
/*
50+
* Attaches the current thread to the passed isolate.
51+
* On failure, returns a non-zero value. On success, writes the address of the
52+
* created isolate thread structure to the passed pointer and returns 0.
53+
* If the thread has already been attached, the call succeeds and also provides
54+
* the thread's isolate thread structure.
55+
*/
56+
int graal_attach_thread(graal_isolate_t* isolate, graal_isolatethread_t** thread);
57+
58+
/*
59+
* Given an isolate to which the current thread is attached, returns the address of
60+
* the thread's associated isolate thread structure. If the current thread is not
61+
* attached to the passed isolate or if another error occurs, returns NULL.
62+
*/
63+
graal_isolatethread_t* graal_get_current_thread(graal_isolate_t* isolate);
64+
65+
/*
66+
* Given an isolate thread structure, determines to which isolate it belongs and returns
67+
* the address of its isolate structure. If an error occurs, returns NULL instead.
68+
*/
69+
graal_isolate_t* graal_get_isolate(graal_isolatethread_t* thread);
70+
71+
/*
72+
* Detaches the passed isolate thread from its isolate and discards any state or
73+
* context that is associated with it. At the time of the call, no code may still
74+
* be executing in the isolate thread's context.
75+
* Returns 0 on success, or a non-zero value on failure.
76+
*/
77+
int graal_detach_thread(graal_isolatethread_t* thread);
78+
79+
/*
80+
* Using the context of the isolate thread from the first argument, detaches the
81+
* threads in an array pointed to by the second argument, with the length of the
82+
* array given in the third argument. All of the passed threads must be in the
83+
* same isolate, including the first argument. None of the threads to detach may
84+
* execute Java code at the time of the call or later without reattaching first,
85+
* or their behavior will be entirely undefined. The current thread may be part of
86+
* the array, however, using detach_thread() should be preferred for detaching only
87+
* the current thread.
88+
* Returns 0 on success, or a non-zero value on failure.
89+
*/
90+
int graal_detach_threads(graal_isolatethread_t* thread, graal_isolatethread_t** array, int length);
91+
92+
/*
93+
* Tears down the passed isolate, waiting for any attached threads to detach from
94+
* it, then discards the isolate's objects, threads, and any other state or context
95+
* that is associated with it.
96+
* Returns 0 on success, or a non-zero value on failure.
97+
*/
98+
int graal_tear_down_isolate(graal_isolatethread_t* isolateThread);
99+
100+
#if defined(__cplusplus)
101+
}
102+
#endif
103+
#endif

mssql/graal_isolate_dynamic.h

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#ifndef __GRAAL_ISOLATE_H
2+
#define __GRAAL_ISOLATE_H
3+
4+
/*
5+
* Structure representing an isolate. A pointer to such a structure can be
6+
* passed to an entry point as the execution context.
7+
*/
8+
struct __graal_isolate_t;
9+
typedef struct __graal_isolate_t graal_isolate_t;
10+
11+
/*
12+
* Structure representing a thread that is attached to an isolate. A pointer to
13+
* such a structure can be passed to an entry point as the execution context,
14+
* requiring that the calling thread has been attached to that isolate.
15+
*/
16+
struct __graal_isolatethread_t;
17+
typedef struct __graal_isolatethread_t graal_isolatethread_t;
18+
19+
#ifdef _WIN64
20+
typedef unsigned long long ulong;
21+
#else
22+
typedef unsigned long ulong;
23+
#endif
24+
25+
26+
/* Parameters for the creation of a new isolate. */
27+
enum { __graal_create_isolate_params_version = 1 };
28+
struct __graal_create_isolate_params_t {
29+
int version; /* Version of this struct */
30+
31+
/* Fields introduced in version 1 */
32+
ulong reserved_address_space_size; /* Size of address space to reserve */
33+
};
34+
typedef struct __graal_create_isolate_params_t graal_create_isolate_params_t;
35+
36+
#if defined(__cplusplus)
37+
extern "C" {
38+
#endif
39+
40+
/*
41+
* Create a new isolate, considering the passed parameters (which may be NULL).
42+
* Returns 0 on success, or a non-zero value on failure.
43+
* On success, the current thread is attached to the created isolate, and the
44+
* address of the isolate and the isolate thread are written to the passed pointers
45+
* if they are not NULL.
46+
*/
47+
typedef int (*graal_create_isolate_fn_t)(graal_create_isolate_params_t* params, graal_isolate_t** isolate, graal_isolatethread_t** thread);
48+
49+
/*
50+
* Attaches the current thread to the passed isolate.
51+
* On failure, returns a non-zero value. On success, writes the address of the
52+
* created isolate thread structure to the passed pointer and returns 0.
53+
* If the thread has already been attached, the call succeeds and also provides
54+
* the thread's isolate thread structure.
55+
*/
56+
typedef int (*graal_attach_thread_fn_t)(graal_isolate_t* isolate, graal_isolatethread_t** thread);
57+
58+
/*
59+
* Given an isolate to which the current thread is attached, returns the address of
60+
* the thread's associated isolate thread structure. If the current thread is not
61+
* attached to the passed isolate or if another error occurs, returns NULL.
62+
*/
63+
typedef graal_isolatethread_t* (*graal_get_current_thread_fn_t)(graal_isolate_t* isolate);
64+
65+
/*
66+
* Given an isolate thread structure, determines to which isolate it belongs and returns
67+
* the address of its isolate structure. If an error occurs, returns NULL instead.
68+
*/
69+
typedef graal_isolate_t* (*graal_get_isolate_fn_t)(graal_isolatethread_t* thread);
70+
71+
/*
72+
* Detaches the passed isolate thread from its isolate and discards any state or
73+
* context that is associated with it. At the time of the call, no code may still
74+
* be executing in the isolate thread's context.
75+
* Returns 0 on success, or a non-zero value on failure.
76+
*/
77+
typedef int (*graal_detach_thread_fn_t)(graal_isolatethread_t* thread);
78+
79+
/*
80+
* Using the context of the isolate thread from the first argument, detaches the
81+
* threads in an array pointed to by the second argument, with the length of the
82+
* array given in the third argument. All of the passed threads must be in the
83+
* same isolate, including the first argument. None of the threads to detach may
84+
* execute Java code at the time of the call or later without reattaching first,
85+
* or their behavior will be entirely undefined. The current thread may be part of
86+
* the array, however, using detach_thread() should be preferred for detaching only
87+
* the current thread.
88+
* Returns 0 on success, or a non-zero value on failure.
89+
*/
90+
typedef int (*graal_detach_threads_fn_t)(graal_isolatethread_t* thread, graal_isolatethread_t** array, int length);
91+
92+
/*
93+
* Tears down the passed isolate, waiting for any attached threads to detach from
94+
* it, then discards the isolate's objects, threads, and any other state or context
95+
* that is associated with it.
96+
* Returns 0 on success, or a non-zero value on failure.
97+
*/
98+
typedef int (*graal_tear_down_isolate_fn_t)(graal_isolatethread_t* isolateThread);
99+
100+
#if defined(__cplusplus)
101+
}
102+
#endif
103+
#endif

mssql/libgdbc-mssql.dylib

26.4 MB
Binary file not shown.

mssql/libgdbc-mssql.h

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#ifndef __LIBGDBC_MSSQL_H
2+
#define __LIBGDBC_MSSQL_H
3+
4+
#include <graal_isolate.h>
5+
6+
7+
#if defined(__cplusplus)
8+
extern "C" {
9+
#endif
10+
11+
char* getError(graal_isolatethread_t*);
12+
13+
void enableTracing(graal_isolatethread_t*, int);
14+
15+
char* openConnection(graal_isolatethread_t*, char*, char*, char*, int);
16+
17+
char* closeConnection(graal_isolatethread_t*);
18+
19+
int isValid(graal_isolatethread_t*, int);
20+
21+
char* begin(graal_isolatethread_t*);
22+
23+
char* commit(graal_isolatethread_t*);
24+
25+
char* rollback(graal_isolatethread_t*);
26+
27+
int prepare(graal_isolatethread_t*, char*);
28+
29+
char* closeStatement(graal_isolatethread_t*, int);
30+
31+
int numInput(graal_isolatethread_t*, int);
32+
33+
int execute(graal_isolatethread_t*, int);
34+
35+
int query(graal_isolatethread_t*, int);
36+
37+
int getMoreResults(graal_isolatethread_t*, int);
38+
39+
int nextResultSet(graal_isolatethread_t*, int);
40+
41+
char* columns(graal_isolatethread_t*, int);
42+
43+
int next(graal_isolatethread_t*, int);
44+
45+
char* setByte(graal_isolatethread_t*, int, int, char);
46+
47+
char getByte(graal_isolatethread_t*, int, int);
48+
49+
char* setShort(graal_isolatethread_t*, int, int, short);
50+
51+
short getShort(graal_isolatethread_t*, int, int);
52+
53+
char* setInt(graal_isolatethread_t*, int, int, int);
54+
55+
int getInt(graal_isolatethread_t*, int, int);
56+
57+
char* setLong(graal_isolatethread_t*, int, int, long long int);
58+
59+
long long int getLong(graal_isolatethread_t*, int, int);
60+
61+
char* setFloat(graal_isolatethread_t*, int, int, float);
62+
63+
float getFloat(graal_isolatethread_t*, int, int);
64+
65+
char* setDouble(graal_isolatethread_t*, int, int, double);
66+
67+
double getDouble(graal_isolatethread_t*, int, int);
68+
69+
char* getBigDecimal(graal_isolatethread_t*, int, int);
70+
71+
char* setString(graal_isolatethread_t*, int, int, char*);
72+
73+
char* getString(graal_isolatethread_t*, int, int);
74+
75+
char* setTimestamp(graal_isolatethread_t*, int, int, long long int);
76+
77+
long long int getTimestamp(graal_isolatethread_t*, int, int);
78+
79+
char* setNull(graal_isolatethread_t*, int, int);
80+
81+
char* testQueryJSON(graal_isolatethread_t*, char*);
82+
83+
#if defined(__cplusplus)
84+
}
85+
#endif
86+
#endif

mssql/libgdbc-mssql.so

29.1 MB
Binary file not shown.

mssql/libgdbc-mssql_dynamic.h

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#ifndef __LIBGDBC_MSSQL_H
2+
#define __LIBGDBC_MSSQL_H
3+
4+
#include <graal_isolate_dynamic.h>
5+
6+
7+
#if defined(__cplusplus)
8+
extern "C" {
9+
#endif
10+
11+
typedef char* (*getError_fn_t)(graal_isolatethread_t*);
12+
13+
typedef void (*enableTracing_fn_t)(graal_isolatethread_t*, int);
14+
15+
typedef char* (*openConnection_fn_t)(graal_isolatethread_t*, char*, char*, char*, int);
16+
17+
typedef char* (*closeConnection_fn_t)(graal_isolatethread_t*);
18+
19+
typedef int (*isValid_fn_t)(graal_isolatethread_t*, int);
20+
21+
typedef char* (*begin_fn_t)(graal_isolatethread_t*);
22+
23+
typedef char* (*commit_fn_t)(graal_isolatethread_t*);
24+
25+
typedef char* (*rollback_fn_t)(graal_isolatethread_t*);
26+
27+
typedef int (*prepare_fn_t)(graal_isolatethread_t*, char*);
28+
29+
typedef char* (*closeStatement_fn_t)(graal_isolatethread_t*, int);
30+
31+
typedef int (*numInput_fn_t)(graal_isolatethread_t*, int);
32+
33+
typedef int (*execute_fn_t)(graal_isolatethread_t*, int);
34+
35+
typedef int (*query_fn_t)(graal_isolatethread_t*, int);
36+
37+
typedef int (*getMoreResults_fn_t)(graal_isolatethread_t*, int);
38+
39+
typedef int (*nextResultSet_fn_t)(graal_isolatethread_t*, int);
40+
41+
typedef char* (*columns_fn_t)(graal_isolatethread_t*, int);
42+
43+
typedef int (*next_fn_t)(graal_isolatethread_t*, int);
44+
45+
typedef char* (*setByte_fn_t)(graal_isolatethread_t*, int, int, char);
46+
47+
typedef char (*getByte_fn_t)(graal_isolatethread_t*, int, int);
48+
49+
typedef char* (*setShort_fn_t)(graal_isolatethread_t*, int, int, short);
50+
51+
typedef short (*getShort_fn_t)(graal_isolatethread_t*, int, int);
52+
53+
typedef char* (*setInt_fn_t)(graal_isolatethread_t*, int, int, int);
54+
55+
typedef int (*getInt_fn_t)(graal_isolatethread_t*, int, int);
56+
57+
typedef char* (*setLong_fn_t)(graal_isolatethread_t*, int, int, long long int);
58+
59+
typedef long long int (*getLong_fn_t)(graal_isolatethread_t*, int, int);
60+
61+
typedef char* (*setFloat_fn_t)(graal_isolatethread_t*, int, int, float);
62+
63+
typedef float (*getFloat_fn_t)(graal_isolatethread_t*, int, int);
64+
65+
typedef char* (*setDouble_fn_t)(graal_isolatethread_t*, int, int, double);
66+
67+
typedef double (*getDouble_fn_t)(graal_isolatethread_t*, int, int);
68+
69+
typedef char* (*getBigDecimal_fn_t)(graal_isolatethread_t*, int, int);
70+
71+
typedef char* (*setString_fn_t)(graal_isolatethread_t*, int, int, char*);
72+
73+
typedef char* (*getString_fn_t)(graal_isolatethread_t*, int, int);
74+
75+
typedef char* (*setTimestamp_fn_t)(graal_isolatethread_t*, int, int, long long int);
76+
77+
typedef long long int (*getTimestamp_fn_t)(graal_isolatethread_t*, int, int);
78+
79+
typedef char* (*setNull_fn_t)(graal_isolatethread_t*, int, int);
80+
81+
typedef char* (*testQueryJSON_fn_t)(graal_isolatethread_t*, char*);
82+
83+
#if defined(__cplusplus)
84+
}
85+
#endif
86+
#endif

0 commit comments

Comments
 (0)