Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Dramatic improvements to MySQL adapter stability

Adding standard source attribution to source files
  • Loading branch information...
commit e532feb5b60647cb823a8fcebaa1210d10178406 1 parent 5ff2adc
@mattt mattt authored
View
24 DBAdapter.h
@@ -1,3 +1,25 @@
+// DBAdapter.h
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
@@ -138,7 +160,7 @@ typedef enum {
@protocol DBResultSet <NSObject>
-@property (readonly) id <DBDataSource> dataSource;
+//@property (readonly) id <DBDataSource> dataSource;
- (NSUInteger)numberOfRecords;
- (NSArray *)recordsAtIndexes:(NSIndexSet *)indexes;
View
26 MongoDBAdapter/MongoDBAdapter/MongoDBAdapter.h
@@ -1,10 +1,24 @@
+// MongoDBAdapter.h
//
-// MongoDBAdapter.h
-// MongoDBAdapter
-//
-// Created by Mattt Thompson on 12/03/05.
-// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
-//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
#import <Foundation/Foundation.h>
#import "DBAdapter.h"
View
26 MongoDBAdapter/MongoDBAdapter/MongoDBAdapter.m
@@ -1,10 +1,24 @@
+// MongoDBAdapter.m
//
-// MongoDBAdapter.m
-// MongoDBAdapter
-//
-// Created by Mattt Thompson on 12/03/05.
-// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
-//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
#import "MongoDBAdapter.h"
#import "MongoDBUtilities.h"
View
26 MongoDBAdapter/MongoDBAdapter/MongoDBUtilities.h
@@ -1,10 +1,24 @@
+// MongoDBUtilities.h
//
-// MongoDBUtilities.h
-// MongoDBAdapter
-//
-// Created by Mattt Thompson on 12/03/06.
-// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
-//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
#import <Foundation/Foundation.h>
#include <stdio.h>
View
26 MongoDBAdapter/MongoDBAdapter/MongoDBUtilities.m
@@ -1,10 +1,24 @@
+// MongoDBUtilities.m
//
-// MongoDBUtilities.m
-// MongoDBAdapter
-//
-// Created by Mattt Thompson on 12/03/06.
-// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
-//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
#import "MongoDBUtilities.h"
View
26 MySQLAdapter/MySQLAdapter/MySQLAdapter.h
@@ -1,10 +1,24 @@
+// MySQLAdapter.h
//
-// MySQL.h
-// Kirin
-//
-// Created by Mattt Thompson on 12/01/31.
-// Copyright (c) 2012年 Heroku. All rights reserved.
-//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
#import <Foundation/Foundation.h>
#import "SQLAdapter.h"
View
74 MySQLAdapter/MySQLAdapter/MySQLAdapter.m
@@ -1,10 +1,24 @@
+// MySQLAdapter.m
//
-// MySQL.m
-// Kirin
-//
-// Created by Mattt Thompson on 12/01/31.
-// Copyright (c) 2012年 Heroku. All rights reserved.
-//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
#import "MySQLAdapter.h"
@@ -117,24 +131,27 @@ - (BOOL)open:(NSError *__autoreleasing *)error {
return NO;
}
- _database = [[self availableDatabases] lastObject];
- mysql_select_db(_mysql_connection, [[_database name] UTF8String]);
+ if ([[NSString stringWithUTF8String:database] length] != 0) {
+ _database = [[MySQLDatabase alloc] initWithConnection:self name:[NSString stringWithUTF8String:database] stringEncoding:NSUTF8StringEncoding];
+ mysql_select_db(_mysql_connection, [[_database name] UTF8String]);
+ NSLog(@"database!");
+ }
return YES;
}
- (BOOL)close:(NSError *__autoreleasing *)error {
- if (!_mysql_connection) {
+ if (_mysql_connection == NULL) {
return NO;
}
- mysql_close(_mysql_connection);
+ mysql_close(_mysql_connection);
return YES;
}
- (BOOL)reset:(NSError *__autoreleasing *)error {
- if (!_mysql_connection) {
+ if (_mysql_connection == NULL) {
return NO;
}
@@ -212,6 +229,19 @@ - (NSArray *)availableDatabases {
return mutableDatabases;
}
+- (void)connectToDatabase:(id <DBDatabase>)database error:(NSError **)error{
+ [self willChangeValueForKey:@"database"];
+
+ if ([[_url lastPathComponent] isEqualToString:@""]) {
+ _url = [_url URLByAppendingPathComponent:[database name]];
+ } else {
+ _url = [[_url URLByDeletingLastPathComponent] URLByAppendingPathComponent:[database name]];
+ }
+
+ [self open:error];
+ [self didChangeValueForKey:@"database"];
+}
+
@end
#pragma mark -
@@ -329,6 +359,14 @@ - (void)fetchResultSetForRecordsAtIndexes:(NSIndexSet *)indexes
success:(void (^)(id<DBResultSet>))success
failure:(void (^)(NSError *))failure
{
+ // TODO Proper empty set handling
+ if ([indexes count] == 0) {
+ if (success) {
+ success(nil);
+ }
+ return;
+ }
+
NSString *SQL = [NSString stringWithFormat:@"SELECT * FROM %@ LIMIT %d OFFSET %d ", _name, [indexes count], [indexes firstIndex]];
[[_database connection] executeSQL:SQL success:^(id<SQLResultSet> resultSet, __unused NSTimeInterval elapsedTime) {
if (success) {
@@ -358,6 +396,16 @@ - (void)fetchResultSetForQuery:(NSString *)query
}];
}
+#pragma mark -
+
+- (void)fetchResultSetForDimension:(NSExpression *)dimension
+ measures:(NSArray *)measures
+ success:(void (^)(id <DBResultSet> resultSet))success
+ failure:(void (^)(NSError *error))failure
+{
+ // TODO
+}
+
@end
#pragma mark -
@@ -385,6 +433,9 @@ + (MySQLField *)fieldInMySQLResult:(void *)result
MYSQL_FIELD *mysql_field = mysql_fetch_field_direct(result, (int)fieldIndex);
field->_name = [NSString stringWithCString:mysql_field->name encoding:NSUTF8StringEncoding];
+ if (!field->_name) {
+ field->_name = @"";
+ }
switch (mysql_field->type) {
case MYSQL_TYPE_BIT:
@@ -544,6 +595,7 @@ - (id)initWithMySQLResult:(void *)result {
[mutableFields addObject:field];
}];
_fields = mutableFields;
+ _fieldsCount = [_fields count];
NSMutableDictionary *mutableKeyedFields = [[NSMutableDictionary alloc] initWithCapacity:_fieldsCount];
for (MySQLField *field in _fields) {
View
4 ...SQLAdapter/PostgreSQLAdapter.xcodeproj/xcuserdata/mattt.xcuserdatad/xcschemes/PostgreSQLAdapter.xcscheme
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
+ LastUpgradeVersion = "0430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -30,11 +31,12 @@
</Testables>
</TestAction>
<LaunchAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<AdditionalOptions>
View
4 PostgreSQLAdapter/PostgreSQLAdapter/PostgreSQLAdapter-Prefix.pch
@@ -1,7 +1,3 @@
-//
-// Prefix header for all source files of the 'PostgreSQLAdapter' target in the 'PostgreSQLAdapter' project
-//
-
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
View
26 PostgreSQLAdapter/PostgreSQLAdapter/PostgreSQLAdapter.h
@@ -1,10 +1,24 @@
+// PostgreSQLAdapter.h
//
-// PostgreSQL.h
-// NoSQL
-//
-// Created by Mattt Thompson on 12/01/24.
-// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
-//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
#import <Foundation/Foundation.h>
#import "SQLAdapter.h"
View
48 PostgreSQLAdapter/PostgreSQLAdapter/PostgreSQLAdapter.m
@@ -1,10 +1,24 @@
+// PostgreSQLAdapter.m
//
-// PostgreSQL.m
-// NoSQL
-//
-// Created by Mattt Thompson on 12/01/24.
-// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
-//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
#import "PostgreSQLAdapter.h"
#import <libpq-fe.h>
@@ -259,6 +273,20 @@ - (NSArray *)availableDatabases {
return mutableDatabases;
}
+- (void)connectToDatabase:(id <DBDatabase>)database error:(NSError **)error{
+ [self willChangeValueForKey:@"database"];
+ [self close:error];
+
+ if ([[_url lastPathComponent] isEqualToString:@""]) {
+ _url = [_url URLByAppendingPathComponent:[database name]];
+ } else {
+ _url = [[_url URLByDeletingLastPathComponent] URLByAppendingPathComponent:[database name]];
+ }
+
+ [self open:error];
+ [self didChangeValueForKey:@"database"];
+}
+
@end
#pragma mark -
@@ -374,6 +402,14 @@ - (void)fetchResultSetForRecordsAtIndexes:(NSIndexSet *)indexes
success:(void (^)(id <DBResultSet> resultSet))success
failure:(void (^)(NSError *error))failure
{
+ // TODO Proper empty set handling
+ if ([indexes count] == 0) {
+ if (success) {
+ success(nil);
+ }
+ return;
+ }
+
[[_database connection] executeSQL:[NSString stringWithFormat:@"SELECT * FROM %@ LIMIT %d OFFSET %d", _name, [indexes count], [indexes firstIndex]] success:^(id<SQLResultSet> resultSet, __unused NSTimeInterval elapsedTime) {
if (success) {
success(resultSet);
View
4 RedisAdapter/RedisAdapter.xcodeproj/xcuserdata/mattt.xcuserdatad/xcschemes/RedisAdapter.xcscheme
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
+ LastUpgradeVersion = "0430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -30,11 +31,12 @@
</Testables>
</TestAction>
<LaunchAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<AdditionalOptions>
View
22 RedisAdapter/RedisAdapter/RedisAdapter.h
@@ -1,3 +1,25 @@
+// RedisAdapter.h
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
#import <Foundation/Foundation.h>
#import "DBAdapter.h"
View
27 RedisAdapter/RedisAdapter/RedisAdapter.m
@@ -1,11 +1,24 @@
+// RedisAdapter.m
//
-// RedisAdapter.m
-// Kirin
-//
-// Created by Mattt Thompson on 12/02/17.
-// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
-//
-
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
#import "RedisAdapter.h"
#import "ObjCHiredis.h"
View
22 SQLAdapter.h
@@ -1,3 +1,25 @@
+// SQLAdapter.h
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
#import <Foundation/Foundation.h>
#import "DBAdapter.h"
View
26 SQLiteAdapter/SQLiteAdapter/SQLiteAdapter.h
@@ -1,10 +1,24 @@
+// SQLiteAdapter.h
//
-// SQLiteAdapter.h
-// SQLiteAdapter
-//
-// Created by Mattt Thompson on 12/03/05.
-// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
-//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
#import <Foundation/Foundation.h>
View
26 SQLiteAdapter/SQLiteAdapter/SQLiteAdapter.m
@@ -1,10 +1,24 @@
+// SQLiteAdapter.m
//
-// SQLiteAdapter.m
-// SQLiteAdapter
-//
-// Created by Mattt Thompson on 12/03/05.
-// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
-//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
#import "SQLiteAdapter.h"
Please sign in to comment.
Something went wrong with that request. Please try again.