File tree Expand file tree Collapse file tree 5 files changed +21
-2
lines changed Expand file tree Collapse file tree 5 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 1
1
* ~
2
2
* .o
3
3
sql
4
+ sqlx
4
5
sqlwrite
5
6
sqledit
6
7
sqlexpand
Original file line number Diff line number Diff line change 4
4
[submodule "AJL "]
5
5
path = AJL
6
6
url = https://github.com/revk/AJL
7
+ [submodule "AXL "]
8
+ path = AXL
9
+ url = https://github.com/revk/AXL
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ifneq ($(wildcard /usr/bin/mariadb_config),)
10
10
endif
11
11
OPTS =-D_GNU_SOURCE --std=gnu99 -g -Wall -funsigned-char -lpopt
12
12
13
- all : sqllib.o sqllibsd.o sqlexpand.o sql sqlwrite sqledit sqlexpand
13
+ all : sqllib.o sqllibsd.o sqlexpand.o sql sqlwrite sqledit sqlexpand sqlx
14
14
15
15
update :
16
16
git pull
@@ -27,6 +27,12 @@ AJL/ajl.c:
27
27
AJL/ajl.o : AJL/ajl.c AJL
28
28
make -C AJL ajl.o
29
29
30
+ AXL/axl.c :
31
+ git submodule update --init AXL
32
+
33
+ AXL/axl.o : AXL/axl.c AXL
34
+ make -C AXL axl.o
35
+
30
36
sqllib.o : sqllib.c sqllib.h Makefile
31
37
gcc -g -O -c -o $@ $< -fPIC ${OPTS} -DLIB ${SQLINC} -DMYSQL_VERSION=${SQLVER}
32
38
@@ -36,6 +42,9 @@ sqllibsd.o: sqllib.c sqllib.h Makefile stringdecimal/stringdecimal.o
36
42
sql : sql.c sqllibsd.o sqllib.h sqlexpand.o sqlexpand.h stringdecimal/stringdecimal.o AJL/ajl.o
37
43
gcc -g -O -o $@ $< -fPIC ${OPTS} -DNOXML ${SQLINC} ${SQLLIB} sqllibsd.o sqlexpand.o stringdecimal/stringdecimal.o AJL/ajl.o -lcrypto -luuid -IAJL
38
44
45
+ sqlx : sql.c sqllibsd.o sqllib.h sqlexpand.o sqlexpand.h stringdecimal/stringdecimal.o AJL/ajl.o AXL/axl.o
46
+ gcc -g -O -o $@ $< -fPIC ${OPTS} ${SQLINC} ${SQLLIB} sqllibsd.o sqlexpand.o stringdecimal/stringdecimal.o AJL/ajl.o AXL/axl.o -lcrypto -luuid -IAJL -IAXL -lcurl
47
+
39
48
sqlwrite : sqlwrite.c sqllibsd.o sqllib.h stringdecimal/stringdecimal.o
40
49
gcc -g -O -o $@ $< -fPIC ${OPTS} ${SQLINC} ${SQLLIB} sqllibsd.o stringdecimal/stringdecimal.o
41
50
Original file line number Diff line number Diff line change @@ -145,9 +145,14 @@ dosql (const char *origquery)
145
145
#ifndef NOJSON
146
146
if (json )
147
147
{
148
+ j_t a = json ;
149
+ #ifndef NOXML
150
+ if (xmlrow && * xmlrow )
151
+ a = j_store_array (json , xmlrow );
152
+ #endif
148
153
while ((row = sql_fetch_row (res )))
149
154
{
150
- j_t j = j_append_object (json );
155
+ j_t j = j_append_object (a );
151
156
for (f = 0 ; f < fields ; f ++ )
152
157
{
153
158
if (!row [f ])
You can’t perform that action at this time.
0 commit comments