Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Correcting some parameters due to a compilation Bug in LLVM CLANG ;; #17

Open
wants to merge 21 commits into
base: dev
Choose a base branch
from

Conversation

genose
Copy link

@genose genose commented Jul 24, 2017

OTHER_CFLAGS = "-I/usr/local/include";

Correcting some Typos in program

Fixed to (Latest SDK) in project configuration, build setting

Sebastien Cotillard added 2 commits July 24, 2017 15:56
…OTHER_CFLAGS = "-I/usr/local/include";

Correcting some Typos in program
Copy link
Author

@genose genose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review
@Pgconnection+execute :: 79 NSParameterAssert(_callback==nil);

Sebastien Cotillard and others added 19 commits July 27, 2017 12:48
Now you can execute Imbriqued queries and parallel Queries

bool cleared_status  NO;

        PGQueryObject* query    = [PGQuery queryWithString:@"SELECT datname FROM pg_database"];

        PGQueryObject* query2   = [PGQuery queryWithString:[NSString stringWithFormat:@"SELECT user FROM %@", NSUserName()]];
        PGQueryObject* query_DD = [PGQuery queryWithString:[NSString stringWithFormat:@"SELECT GG FROM %@", NSUserName()]];

        NSString* username = NSUserName();
        NSString* userpassword = @"pass";
        NSString* dbname = NSUserName();

        NSURL* urlBDD_test = [NSURL URLWithHost:@"localhost" port: 5432 ssl:NO username:username database:dbname params:nil];
        //          urlBDD_test = [NSURL URLWithSocketPath:nil port:(NSUInteger)5432 database:nil username:username params:nil];

        urlBDD_test = [NSURL URLWithHost:@"localhost" ssl:NO username: username database:dbname params:[NSDictionary dictionaryWithObjectsAndKeys:
                                                                                                        @"5432", @"port",

                                                                                                        [NSString stringWithFormat:@"%d",20], @"connect_timeout",

                                                                                                        userpassword,  @"password",

                                                                                                        nil] ];

        NSLog(@" Start Connection with  : %@ : %@", urlBDD_test, urlBDD);

        // :: has property ::  PGConnection * SQLServ_db = [PGConnection new];

        //        [SQLServ_db connectWithURL:urlBDD_test usedPassword:&isConnected error:&cnxError];

[((PGConnection*)[self SQLServ_db]) connectWithURL: urlBDD_test   whenDone:^(BOOL usedPassword, NSError *errorConnect) {
            NSLog(@" SQLServ_db  :: .... :");
            if(errorConnect) {
                NSLog(@" SQLServ_db  :: connectWithURL: Error: %@",errorConnect);
                //
                [[self SQLServ_db] disconnect];
                cleared_status =  YES;

            }else {
                NSLog(@" SQLServ_db  :: connectWithURL: connected .... : %@",errorConnect);

                [[self SQLServ_db] execute:query whenDone:^(PGResult* result, NSError* error) {
                    NSLog(@" SQLServ_db :: query_1 :: pass ");

                    NSLog(@" SQLServ_db :: query_1 :: obj execute: result :: %@ ", [result fetchRowAsDictionary]);

                    if(error) {
                        NSLog(@" SQLServ_db :: query_1 :: obj execute:error :: %@ :: %@", result, error);
                    }

                    [[self SQLServ_db] execute:query_DD whenDone:^(PGResult* result, NSError* error) {
                        NSLog(@" SQLServ_db :: query_DD :: pass ");

                        NSLog(@" SQLServ_db :: query_DD :: obj execute: result :: %@ ", [result fetchRowAsDictionary]);

                        if(error) {
                            NSLog(@" SQLServ_db :: query_DD :: obj execute:error :: %@ :: %@", result, error);
                        }
                    }];

                }];

                NSLog(@" SQLServ_db :: backmain end :: pass ");

                [[self SQLServ_db] execute:query2 whenDone:^(PGResult* result, NSError* error) {
                    NSLog(@" SQLServ_db :: query_2 :: pass ");
                    if(result) {
                        NSLog(@" SQLServ_db :: query_2 :: obj execute: result :: %@ ", [result fetchRowAsDictionary]);
                    }
                    if(error) {
                        NSLog(@" SQLServ_db :: query_2 :: obj execute:error :: %@ :: %@", result, error);
                    }

                }];

            }

            NSLog(@" SQLServ_db  ..... DONE :: .... :");
            [[self SQLServ_db] disconnect];
            cleared_status =  YES;
        }];

        [NSThread sleepForTimeInterval:6.0];

        [[self SQLServ_db] execute:query2 whenDone:^(PGResult* result, NSError* error) {
            //                    if(result) {
            NSLog(@" SQLServ_db :: query_LL :: pass ");
            NSLog(@" SQLServ_db :: query_LL :: obj execute: result :: %@ ", [result fetchRowAsDictionary]);
            //                    }
            if(error) {
                NSLog(@" SQLServ_db :: query_LL :: obj execute:error :: %@ :: %@", result, error);
            }
            [[self SQLServ_db] disconnect];
            cleared_status =  YES;

        }];
        NSLog(@" SQLServ_db  ..... exit :: .... :");
Performance tunning and connection debug
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant