ObjSQLite3  Diff

Differences From Artifact [48f8ce5290]:

To Artifact [8fccf2b938]:


1
2

3
4
5
6
7
8
9
1

2
3
4
5
6
7
8
9

-
+







/*
 * Copyright (c) 2020 Jonathan Schleifer <js@nil.im>
 * Copyright (c) 2020, 2024 Jonathan Schleifer <js@nil.im>
 *
 * https://fl.nil.im/objsqlite3
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
66
67
68
69
70
71
72
73

74
75
76
77

78
79
80

81

82

83
84
85
86
87
88
89
66
67
68
69
70
71
72

73
74
75
76

77
78
79

80
81
82

83
84
85
86
87
88
89
90







-
+



-
+


-
+

+
-
+







- (void)dealloc
{
	sqlite3_close(_conn);

	[super dealloc];
}

- (SL3PreparedStatement *)prepareStatement: (OFConstantString *)SQL
- (SL3PreparedStatement *)prepareStatement: (OFConstantString *)SQLStatement
{
	return [[[SL3PreparedStatement alloc]
	    sl3_initWithConnection: self
		      SQLStatement: SQL] autorelease];
		      SQLStatement: SQLStatement] autorelease];
}

- (void)executeStatement: (OFConstantString *)SQL
- (void)executeStatement: (OFConstantString *)SQLStatement
{
	int code =
	int code = sqlite3_exec(_conn, SQL.UTF8String, NULL, NULL, NULL);
	    sqlite3_exec(_conn, SQLStatement.UTF8String, NULL, NULL, NULL);

	if (code != SQLITE_OK)
		@throw [SL3ExecuteStatementFailedException
		    exceptionWithConnection: self
				  errorCode: code];
}