geokit-rails 1.1.4 → 2.0.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of geokit-rails might be problematic. Click here for more details.
- checksums.yaml +15 -0
- data/lib/geokit-rails.rb +10 -26
- data/lib/geokit-rails/acts_as_mappable.rb +269 -369
- data/lib/geokit-rails/adapters/mysql2.rb +22 -0
- data/lib/geokit-rails/adapters/sqlite.rb +53 -0
- data/lib/geokit-rails/core_extensions.rb +10 -0
- data/lib/geokit-rails/defaults.rb +0 -1
- data/lib/geokit-rails/geocoder_control.rb +11 -9
- data/lib/geokit-rails/ip_geocode_lookup.rb +2 -4
- data/lib/geokit-rails/railtie.rb +38 -0
- data/lib/geokit-rails/version.rb +3 -0
- data/test/acts_as_mappable_test.rb +236 -281
- data/test/boot.rb +20 -13
- data/test/database.yml +10 -6
- data/test/{ip_geocode_lookup_test.rb → ip_geocode_lookup_test.disabled.rb} +7 -2
- data/test/models/mock_family.rb +2 -0
- data/test/models/mock_organization.rb +2 -0
- data/test/models/mock_person.rb +3 -0
- data/test/sqlite-debug.log +1293 -0
- data/test/tasks.rake +16 -10
- data/test/test.sqlite3 +0 -0
- data/test/test_helper.rb +26 -5
- metadata +223 -126
- data/CHANGELOG.rdoc +0 -46
- data/MIT-LICENSE +0 -20
- data/Manifest.txt +0 -44
- data/README.markdown +0 -561
- data/Rakefile +0 -54
- data/about.yml +0 -9
- data/assets/api_keys_template +0 -61
- data/geokit-rails.gemspec +0 -39
- data/init.rb +0 -1
- data/install.rb +0 -14
data/test/boot.rb
CHANGED
@@ -1,25 +1,32 @@
|
|
1
|
-
require '
|
2
|
-
require 'active_support/test_case'
|
1
|
+
require 'pathname'
|
3
2
|
|
4
3
|
require 'test/unit'
|
5
|
-
require '
|
6
|
-
require 'active_support/testing/setup_and_teardown'
|
4
|
+
require 'active_support/test_case'
|
7
5
|
|
8
6
|
require 'active_record'
|
7
|
+
require 'active_record/test_case'
|
9
8
|
require 'active_record/fixtures'
|
10
9
|
|
11
10
|
require 'action_controller'
|
12
|
-
require '
|
11
|
+
# require 'action_dispatch'
|
12
|
+
# require 'action_dispatch/testing/test_process'
|
13
|
+
|
14
|
+
pwd = Pathname.new(File.dirname(__FILE__)).expand_path
|
15
|
+
|
16
|
+
PLUGIN_ROOT = pwd + '..'
|
17
|
+
ADAPTER = ENV['DB'] || 'sqlite'
|
13
18
|
|
14
|
-
|
15
|
-
|
19
|
+
$LOAD_PATH << (PLUGIN_ROOT + 'lib')
|
20
|
+
$LOAD_PATH << (PLUGIN_ROOT + 'test/models')
|
16
21
|
|
17
|
-
|
22
|
+
config_file = PLUGIN_ROOT + 'test/database.yml'
|
23
|
+
db_config = YAML::load(IO.read(config_file))
|
24
|
+
logger_file = PLUGIN_ROOT + "test/#{ADAPTER}-debug.log"
|
25
|
+
schema_file = PLUGIN_ROOT + 'test/schema.rb'
|
18
26
|
|
19
|
-
|
20
|
-
ActiveRecord::Base.
|
21
|
-
ActiveRecord::Base.
|
22
|
-
ActiveRecord::Base.establish_connection(config[ADAPTER])
|
27
|
+
ActiveRecord::Base.configurations = db_config
|
28
|
+
ActiveRecord::Base.logger = Logger.new(logger_file)
|
29
|
+
ActiveRecord::Base.establish_connection(db_config[ADAPTER])
|
23
30
|
|
24
31
|
ActiveRecord::Migration.verbose = false
|
25
|
-
load
|
32
|
+
load schema_file
|
data/test/database.yml
CHANGED
@@ -1,20 +1,24 @@
|
|
1
|
-
|
1
|
+
base: &base
|
2
2
|
host: localhost
|
3
|
-
username:
|
3
|
+
username: tests
|
4
4
|
password:
|
5
5
|
|
6
6
|
mysql:
|
7
7
|
adapter: mysql
|
8
|
-
database:
|
8
|
+
database: geokit_rails_tests
|
9
9
|
<<: *base
|
10
10
|
|
11
11
|
postgresql:
|
12
12
|
adapter: postgresql
|
13
|
-
database:
|
13
|
+
database: geokit_rails_tests
|
14
14
|
<<: *base
|
15
15
|
|
16
16
|
sqlserver:
|
17
17
|
adapter: sqlserver
|
18
18
|
mode: ODBC
|
19
|
-
dsn:
|
20
|
-
username:
|
19
|
+
dsn: geokit_rails_tests
|
20
|
+
username: tests
|
21
|
+
|
22
|
+
sqlite:
|
23
|
+
adapter: sqlite3
|
24
|
+
database: test/test.sqlite3
|
@@ -1,7 +1,12 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
module TestApp
|
4
|
+
class Application < Rails::Application
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
TestApp::Application.routes.draw do
|
9
|
+
match ':controller(/:action(/:id(.:format)))'
|
5
10
|
end
|
6
11
|
|
7
12
|
class LocationAwareController < ActionController::Base #:nodoc: all
|
data/test/models/mock_family.rb
CHANGED
data/test/models/mock_person.rb
CHANGED
@@ -0,0 +1,1293 @@
|
|
1
|
+
# Logfile created on 2013-06-19 21:13:08 +0930 by logger.rb/31641
|
2
|
+
[1m[36m (1.4ms)[0m [1mselect sqlite_version(*)[0m
|
3
|
+
[1m[35m (45.6ms)[0m CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
4
|
+
[1m[36m (44.1ms)[0m [1mCREATE TABLE "locations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "company_id" integer DEFAULT 0 NOT NULL, "street" varchar(60), "city" varchar(60), "state" varchar(2), "postal_code" varchar(16), "lat" decimal(15,10), "lng" decimal(15,10)) [0m
|
5
|
+
[1m[35m (41.5ms)[0m CREATE TABLE "custom_locations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "company_id" integer DEFAULT 0 NOT NULL, "street" varchar(60), "city" varchar(60), "state" varchar(2), "postal_code" varchar(16), "latitude" decimal(15,10), "longitude" decimal(15,10))
|
6
|
+
[1m[36m (42.0ms)[0m [1mCREATE TABLE "stores" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "address" varchar(255), "lat" decimal(15,10), "lng" decimal(15,10)) [0m
|
7
|
+
[1m[35m (39.0ms)[0m CREATE TABLE "mock_organizations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
8
|
+
[1m[36m (41.9ms)[0m [1mCREATE TABLE "mock_addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "addressable_id" integer NOT NULL, "addressable_type" varchar(255) NOT NULL, "street" varchar(60), "city" varchar(60), "state" varchar(2), "postal_code" varchar(16), "lat" decimal(15,10), "lng" decimal(15,10)) [0m
|
9
|
+
[1m[35m (31.2ms)[0m CREATE TABLE "mock_houses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "address" varchar(255), "lat" decimal(15,10), "lng" decimal(15,10))
|
10
|
+
[1m[36m (35.3ms)[0m [1mCREATE TABLE "mock_families" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "mock_house_id" integer) [0m
|
11
|
+
[1m[35m (40.4ms)[0m CREATE TABLE "mock_people" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "mock_family_id" integer)
|
12
|
+
[1m[36m (39.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
13
|
+
[1m[35m (38.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
14
|
+
[1m[36m (0.2ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
15
|
+
[1m[35m (35.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('0')
|
16
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17
|
+
[1m[35mFixture Delete (0.2ms)[0m DELETE FROM "mock_families"
|
18
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "mock_families" ("id", "mock_house_id") VALUES (964944192, 185830233)[0m
|
19
|
+
[1m[35mFixture Delete (0.1ms)[0m DELETE FROM "companies"
|
20
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "companies" ("id", "name") VALUES (1, 'Starbucks')[0m
|
21
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "companies" ("id", "name") VALUES (2, 'Barnes & Noble')
|
22
|
+
[1m[36mFixture Delete (0.2ms)[0m [1mDELETE FROM "stores"[0m
|
23
|
+
[1m[35mFixture Delete (0.1ms)[0m DELETE FROM "mock_addresses"
|
24
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "mock_addresses" ("street", "city", "state", "postal_code", "lat", "lng", "id", "addressable_type", "addressable_id") VALUES ('106 N Denton Tap Rd', 'Coppell', 'TX', 75019, 32.969527, -96.990159, 214970392, 'MockOrganization', 378604642)[0m
|
25
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "mock_addresses" ("street", "city", "state", "postal_code", "lat", "lng", "id", "addressable_type", "addressable_id") VALUES ('5904 N Macarthur Blvd', 'Irving', 'TX', 75039, 32.895155, -96.958444, 206296981, 'MockOrganization', 1064917858)
|
26
|
+
[1m[36mFixture Delete (0.1ms)[0m [1mDELETE FROM "mock_people"[0m
|
27
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "mock_people" ("id", "mock_family_id") VALUES (254095803, 964944192)
|
28
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "mock_people" ("id", "mock_family_id") VALUES (450002714, 964944192)[0m
|
29
|
+
[1m[35mFixture Delete (0.1ms)[0m DELETE FROM "custom_locations"
|
30
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "custom_locations" ("id", "company_id", "street", "city", "state", "postal_code", "latitude", "longitude") VALUES (1, 1, '7979 N MacArthur Blvd', 'Irving', 'TX', 75063, 32.918593, -96.958444)[0m
|
31
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "custom_locations" ("id", "company_id", "street", "city", "state", "postal_code", "latitude", "longitude") VALUES (2, 1, '7750 N Macarthur Blvd', 'Irving', 'TX', 75063, 32.914144, -96.958444)
|
32
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "custom_locations" ("id", "company_id", "street", "city", "state", "postal_code", "latitude", "longitude") VALUES (3, 1, '5904 N Macarthur Blvd', 'Irving', 'TX', 75039, 32.895155, -96.958444)[0m
|
33
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "custom_locations" ("id", "company_id", "street", "city", "state", "postal_code", "latitude", "longitude") VALUES (4, 1, '817 S Macarthur Blvd', 'Coppell', 'TX', 75019, 32.951613, -96.958444)
|
34
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "custom_locations" ("id", "company_id", "street", "city", "state", "postal_code", "latitude", "longitude") VALUES (5, 1, '106 N Denton Tap Rd', 'Coppell', 'TX', 75019, 32.969527, -96.990159)[0m
|
35
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "custom_locations" ("id", "company_id", "street", "city", "state", "postal_code", "latitude", "longitude") VALUES (6, 2, '5904 N Macarthur Blvd', 'Irving', 'TX', 75039, 32.895155, -96.958444)
|
36
|
+
[1m[36mFixture Delete (0.2ms)[0m [1mDELETE FROM "mock_houses"[0m
|
37
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "mock_houses" ("address", "lat", "lng", "id") VALUES ('106 N Denton Tap Rd', 32.969527, -96.990159, 966034833)
|
38
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "mock_houses" ("address", "lat", "lng", "id") VALUES ('5904 N Macarthur Blvd', 32.895155, -96.958444, 185830233)[0m
|
39
|
+
[1m[35mFixture Delete (0.1ms)[0m DELETE FROM "locations"
|
40
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "locations" ("id", "company_id", "street", "city", "state", "postal_code", "lat", "lng") VALUES (1, 1, '7979 N MacArthur Blvd', 'Irving', 'TX', 75063, 32.918593, -96.958444)[0m
|
41
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "locations" ("id", "company_id", "street", "city", "state", "postal_code", "lat", "lng") VALUES (2, 1, '7750 N Macarthur Blvd', 'Irving', 'TX', 75063, 32.914144, -96.958444)
|
42
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "locations" ("id", "company_id", "street", "city", "state", "postal_code", "lat", "lng") VALUES (3, 1, '5904 N Macarthur Blvd', 'Irving', 'TX', 75039, 32.895155, -96.958444)[0m
|
43
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "locations" ("id", "company_id", "street", "city", "state", "postal_code", "lat", "lng") VALUES (4, 1, '817 S Macarthur Blvd', 'Coppell', 'TX', 75019, 32.951613, -96.958444)
|
44
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "locations" ("id", "company_id", "street", "city", "state", "postal_code", "lat", "lng") VALUES (5, 1, '106 N Denton Tap Rd', 'Coppell', 'TX', 75019, 32.969527, -96.990159)[0m
|
45
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "locations" ("id", "company_id", "street", "city", "state", "postal_code", "lat", "lng") VALUES (6, 2, '5904 N Macarthur Blvd', 'Irving', 'TX', 75039, 32.895155, -96.958444)
|
46
|
+
[1m[36mFixture Delete (0.1ms)[0m [1mDELETE FROM "mock_organizations"[0m
|
47
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "mock_organizations" ("name", "id") VALUES ('Starbucks', 378604642)
|
48
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "mock_organizations" ("name", "id") VALUES ('Barnes & Noble', 1064917858)[0m
|
49
|
+
[1m[35m (22.2ms)[0m commit transaction
|
50
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
51
|
+
[1m[35mCompany Load (4.6ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
52
|
+
[1m[36mLocation Load (0.4ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
53
|
+
[1m[35mCustomLocation Load (0.1ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
54
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
55
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
56
|
+
[1m[36mMockOrganization Load (0.1ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
57
|
+
[1m[35mMockAddress Load (0.1ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
58
|
+
[1m[36mLocation Load (0.5ms)[0m [1mSELECT "locations".* FROM "locations" WHERE (
|
59
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
60
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
61
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
62
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
63
|
+
END)
|
64
|
+
< 5 and city = 'Coppell')[0m
|
65
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "locations" WHERE (
|
66
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
67
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
68
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
69
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
70
|
+
END)
|
71
|
+
< 5 and city = 'Coppell')
|
72
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
73
|
+
[1m[35m (0.0ms)[0m begin transaction
|
74
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
75
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
76
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
77
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
78
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
79
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
80
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
81
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
82
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "stores" ("address", "lat", "lng") VALUES (?, ?, ?)[0m [["address", "Irving, TX"], ["lat", #<BigDecimal:42346d8,'0.32918593E2',18(45)>], ["lng", #<BigDecimal:42344d0,'-0.96958444E2',18(45)>]]
|
83
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
84
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
85
|
+
[1m[35m (0.0ms)[0m begin transaction
|
86
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
87
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
88
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
89
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
90
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
91
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
92
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
93
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
94
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
95
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
96
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
97
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
98
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
99
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
100
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
101
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
102
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
103
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
104
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
105
|
+
[1m[35m (0.0ms)[0m begin transaction
|
106
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
107
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
108
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
109
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
110
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
111
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
112
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
113
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
114
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
115
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
116
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
117
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
118
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
119
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
120
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
121
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
122
|
+
[1m[36mLocation Load (0.3ms)[0m [1mSELECT "locations".* FROM "locations" ORDER BY
|
123
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
124
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
125
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
126
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
127
|
+
END)
|
128
|
+
ASC[0m
|
129
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
130
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
131
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
132
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
133
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
134
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
135
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
136
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
137
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
138
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
139
|
+
[1m[35m (0.0ms)[0m begin transaction
|
140
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
141
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
142
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
143
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
144
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
145
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
146
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
147
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
148
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
149
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
150
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
151
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
152
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
153
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
154
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
155
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
156
|
+
[1m[36mLocation Load (0.3ms)[0m [1mSELECT "locations".* FROM "locations" WHERE ((
|
157
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
158
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
159
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
160
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
161
|
+
END)
|
162
|
+
> 3.95))[0m
|
163
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "locations" WHERE ((
|
164
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
165
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
166
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
167
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
168
|
+
END)
|
169
|
+
> 3.95))
|
170
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
171
|
+
[1m[35m (0.0ms)[0m begin transaction
|
172
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
173
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
174
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
175
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
176
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
177
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
178
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
179
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" WHERE ((
|
180
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
181
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
182
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
183
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
184
|
+
END)
|
185
|
+
> 3.95))
|
186
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE ((
|
187
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
188
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
189
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
190
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
191
|
+
END)
|
192
|
+
> 3.95))[0m
|
193
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
194
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
195
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
196
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
197
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
198
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
199
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
200
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
201
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
202
|
+
[1m[36mCustomLocation Load (0.1ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE ((
|
203
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
204
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
205
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
206
|
+
END)
|
207
|
+
> 3.95))[0m
|
208
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "custom_locations" WHERE ((
|
209
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
210
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
211
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
212
|
+
END)
|
213
|
+
> 3.95))
|
214
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
215
|
+
[1m[35m (0.0ms)[0m begin transaction
|
216
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
217
|
+
[1m[35mLocation Load (0.1ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
218
|
+
[1m[36mCustomLocation Load (0.1ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
219
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
220
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
221
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
222
|
+
[1m[36mMockAddress Load (0.1ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
223
|
+
[1m[35mCustomLocation Load (0.1ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE ((
|
224
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
225
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
226
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
227
|
+
END)
|
228
|
+
> 3.95))
|
229
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "custom_locations" WHERE ((
|
230
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
231
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
232
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
233
|
+
END)
|
234
|
+
> 3.95))[0m
|
235
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
236
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
237
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
238
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
239
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
240
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
241
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
242
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
243
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
244
|
+
[1m[36mLocation Load (0.3ms)[0m [1mSELECT "locations".* FROM "locations" WHERE ((
|
245
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
246
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
247
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
248
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
249
|
+
END)
|
250
|
+
> 3.95))[0m
|
251
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "locations" WHERE ((
|
252
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
253
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
254
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
255
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
256
|
+
END)
|
257
|
+
> 3.95))
|
258
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
259
|
+
[1m[35m (0.0ms)[0m begin transaction
|
260
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
261
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
262
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
263
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
264
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
265
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
266
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
267
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" ORDER BY
|
268
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
269
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
270
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
271
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
272
|
+
END)
|
273
|
+
asc
|
274
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
275
|
+
[1m[35m (0.0ms)[0m begin transaction
|
276
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
277
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
278
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
279
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
280
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
281
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
282
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
283
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" ORDER BY
|
284
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
285
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
286
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
287
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
288
|
+
END)
|
289
|
+
asc
|
290
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
291
|
+
[1m[35m (0.0ms)[0m begin transaction
|
292
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
293
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
294
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
295
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
296
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
297
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
298
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
299
|
+
[1m[35mCustomLocation Load (0.2ms)[0m SELECT "custom_locations".* FROM "custom_locations" ORDER BY
|
300
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
301
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
302
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
303
|
+
END)
|
304
|
+
asc
|
305
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
306
|
+
[1m[35m (0.0ms)[0m begin transaction
|
307
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
308
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
309
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
310
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
311
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
312
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
313
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
314
|
+
[1m[35mCustomLocation Load (0.2ms)[0m SELECT "custom_locations".* FROM "custom_locations" ORDER BY
|
315
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
316
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
317
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
318
|
+
END)
|
319
|
+
asc
|
320
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
321
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
323
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
324
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
325
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
326
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
327
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
328
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
329
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" ORDER BY
|
330
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
331
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
332
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
333
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
334
|
+
END)
|
335
|
+
asc LIMIT 1
|
336
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
337
|
+
[1m[35m (0.0ms)[0m begin transaction
|
338
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
339
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
340
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
341
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
342
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
343
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
344
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
345
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" ORDER BY
|
346
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
347
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
348
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
349
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
350
|
+
END)
|
351
|
+
asc LIMIT 1
|
352
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
353
|
+
[1m[35m (0.0ms)[0m begin transaction
|
354
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
355
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
356
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
357
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
358
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
359
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
360
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
361
|
+
[1m[35mCustomLocation Load (0.2ms)[0m SELECT "custom_locations".* FROM "custom_locations" ORDER BY
|
362
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
363
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
364
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
365
|
+
END)
|
366
|
+
asc LIMIT 1
|
367
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
368
|
+
[1m[35m (0.0ms)[0m begin transaction
|
369
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
370
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
371
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
372
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
373
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
374
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
375
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
376
|
+
[1m[35mCustomLocation Load (0.2ms)[0m SELECT "custom_locations".* FROM "custom_locations" ORDER BY
|
377
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
378
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
379
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
380
|
+
END)
|
381
|
+
asc LIMIT 1
|
382
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
383
|
+
[1m[35m (0.0ms)[0m begin transaction
|
384
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
385
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
386
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
387
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
388
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
389
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
390
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
391
|
+
[1m[35mLocation Load (0.5ms)[0m SELECT "locations".* FROM "locations" WHERE ((locations.lat>32.77402314714641 AND locations.lat<33.063162852853594 AND locations.lng>-97.13066489961247 AND locations.lng<-96.78622310038755)) AND ((
|
392
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
393
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
394
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
395
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
396
|
+
END)
|
397
|
+
>= 0 AND
|
398
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
399
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
400
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
401
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
402
|
+
END)
|
403
|
+
<= 10))
|
404
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE ((locations.lat>32.77402314714641 AND locations.lat<33.063162852853594 AND locations.lng>-97.13066489961247 AND locations.lng<-96.78622310038755)) AND ((
|
405
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
406
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
407
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
408
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
409
|
+
END)
|
410
|
+
>= 0 AND
|
411
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
412
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
413
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
414
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
415
|
+
END)
|
416
|
+
<= 10))[0m
|
417
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
418
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
419
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
420
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
421
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
422
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
423
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
424
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
425
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
426
|
+
[1m[36mLocation Load (0.5ms)[0m [1mSELECT "locations".* FROM "locations" WHERE ((locations.lat>32.788480132431765 AND locations.lat<33.048705867568216 AND locations.lng>-97.11344283584512 AND locations.lng<-96.80344516415488)) AND ((
|
427
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
428
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
429
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
430
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
431
|
+
END)
|
432
|
+
>= 0 AND
|
433
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
434
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
435
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
436
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
437
|
+
END)
|
438
|
+
< 10))[0m
|
439
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "locations" WHERE ((locations.lat>32.788480132431765 AND locations.lat<33.048705867568216 AND locations.lng>-97.11344283584512 AND locations.lng<-96.80344516415488)) AND ((
|
440
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
441
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
442
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
443
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
444
|
+
END)
|
445
|
+
>= 0 AND
|
446
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
447
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
448
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
449
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
450
|
+
END)
|
451
|
+
< 10))
|
452
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
453
|
+
[1m[35m (0.0ms)[0m begin transaction
|
454
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
455
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
456
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
457
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
458
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
459
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
460
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
461
|
+
[1m[35mLocation Load (0.5ms)[0m SELECT "locations".* FROM "locations" WHERE ((locations.lat>32.77402314714641 AND locations.lat<33.063162852853594 AND locations.lng>-97.13066489961247 AND locations.lng<-96.78622310038755)) AND ((
|
462
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
463
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
464
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
465
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
466
|
+
END)
|
467
|
+
>= 0 AND
|
468
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
469
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
470
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
471
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
472
|
+
END)
|
473
|
+
<= 10)) AND (city = 'Coppell')
|
474
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE ((locations.lat>32.77402314714641 AND locations.lat<33.063162852853594 AND locations.lng>-97.13066489961247 AND locations.lng<-96.78622310038755)) AND ((
|
475
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
476
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
477
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
478
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
479
|
+
END)
|
480
|
+
>= 0 AND
|
481
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
482
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
483
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
484
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
485
|
+
END)
|
486
|
+
<= 10)) AND (city = 'Coppell')[0m
|
487
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
488
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
489
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
490
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
491
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
492
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
493
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
494
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
495
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
496
|
+
[1m[36mLocation Load (0.4ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."city" = 'Coppell' AND ((locations.lat>32.77402314714641 AND locations.lat<33.063162852853594 AND locations.lng>-97.13066489961247 AND locations.lng<-96.78622310038755)) AND ((
|
497
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
498
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
499
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
500
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
501
|
+
END)
|
502
|
+
>= 0 AND
|
503
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
504
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
505
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
506
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
507
|
+
END)
|
508
|
+
<= 10))[0m
|
509
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "locations" WHERE "locations"."city" = 'Coppell' AND ((locations.lat>32.77402314714641 AND locations.lat<33.063162852853594 AND locations.lng>-97.13066489961247 AND locations.lng<-96.78622310038755)) AND ((
|
510
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
511
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
512
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
513
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
514
|
+
END)
|
515
|
+
>= 0 AND
|
516
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
517
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
518
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
519
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
520
|
+
END)
|
521
|
+
<= 10))
|
522
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
523
|
+
[1m[35m (0.0ms)[0m begin transaction
|
524
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
525
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
526
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
527
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
528
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
529
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
530
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
531
|
+
[1m[35mLocation Load (0.4ms)[0m SELECT "locations".* FROM "locations" WHERE (
|
532
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
533
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
534
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
535
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
536
|
+
END)
|
537
|
+
< 3.97)
|
538
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE (
|
539
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
540
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
541
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
542
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
543
|
+
END)
|
544
|
+
< 3.97)[0m
|
545
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
546
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
547
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
548
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
549
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
550
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
551
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
552
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
553
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
554
|
+
[1m[36mLocation Load (0.3ms)[0m [1mSELECT "locations".* FROM "locations" WHERE (
|
555
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
556
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
557
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
558
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
559
|
+
END)
|
560
|
+
< 5 and city = 'Coppell')[0m
|
561
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "locations" WHERE (
|
562
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
563
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
564
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
565
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
566
|
+
END)
|
567
|
+
< 5 and city = 'Coppell')
|
568
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
569
|
+
[1m[35m (0.0ms)[0m begin transaction
|
570
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
571
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
572
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
573
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
574
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
575
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
576
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
577
|
+
[1m[35mCustomLocation Load (0.1ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE (
|
578
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
579
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
580
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
581
|
+
END)
|
582
|
+
< 5 and city = 'Coppell')
|
583
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "custom_locations" WHERE (
|
584
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
585
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
586
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
587
|
+
END)
|
588
|
+
< 5 and city = 'Coppell')[0m
|
589
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
590
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
591
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
592
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
593
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
594
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
595
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
596
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
597
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
598
|
+
[1m[36mCustomLocation Load (0.2ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE (
|
599
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
600
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
601
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
602
|
+
END)
|
603
|
+
< 3.97)[0m
|
604
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "custom_locations" WHERE (
|
605
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
606
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
607
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
608
|
+
END)
|
609
|
+
< 3.97)
|
610
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
611
|
+
[1m[35m (0.0ms)[0m begin transaction
|
612
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
613
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
614
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
615
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
616
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
617
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
618
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
619
|
+
[1m[35mCustomLocation Load (0.2ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE (
|
620
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
621
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
622
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
623
|
+
END)
|
624
|
+
< 3.97)
|
625
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "custom_locations" WHERE (
|
626
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
627
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
628
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
629
|
+
END)
|
630
|
+
< 3.97)[0m
|
631
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
632
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
633
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
634
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
635
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
636
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
637
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
638
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
639
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
640
|
+
[1m[36mLocation Load (0.4ms)[0m [1mSELECT "locations".* FROM "locations" WHERE ((locations.lat>32.86119876841712 AND locations.lat<32.97598723158287 AND locations.lng>-97.02681574837437 AND locations.lng<-96.89007225162564)) AND ((
|
641
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
642
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
643
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
644
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
645
|
+
END)
|
646
|
+
<= 3.97))[0m
|
647
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "locations" WHERE ((locations.lat>32.86119876841712 AND locations.lat<32.97598723158287 AND locations.lng>-97.02681574837437 AND locations.lng<-96.89007225162564)) AND ((
|
648
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
649
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
650
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
651
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
652
|
+
END)
|
653
|
+
<= 3.97))
|
654
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
655
|
+
[1m[35m (0.0ms)[0m begin transaction
|
656
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
657
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
658
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
659
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
660
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
661
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
662
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
663
|
+
[1m[35mLocation Load (0.2ms)[0m SELECT "locations".* FROM "locations" WHERE ((locations.lat>32.8262562349824 AND locations.lat<33.01092976501758 AND locations.lng>-97.06844154650788 AND locations.lng<-96.84844645349213)) AND ((
|
664
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
665
|
+
SQRT(POW(69.1*(32.918593-locations.lat),2)+
|
666
|
+
POW(48.20039936816744*(-96.958444-locations.lng),2))
|
667
|
+
END)
|
668
|
+
<= 6.387))
|
669
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE ((locations.lat>32.8262562349824 AND locations.lat<33.01092976501758 AND locations.lng>-97.06844154650788 AND locations.lng<-96.84844645349213)) AND ((
|
670
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
671
|
+
SQRT(POW(69.1*(32.918593-locations.lat),2)+
|
672
|
+
POW(48.20039936816744*(-96.958444-locations.lng),2))
|
673
|
+
END)
|
674
|
+
<= 6.387))[0m
|
675
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
676
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
677
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
678
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
679
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
680
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
681
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
682
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
683
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
684
|
+
[1m[36mLocation Load (0.3ms)[0m [1mSELECT "locations".* FROM "locations" WHERE ((locations.lat>32.861205327521695 AND locations.lat<32.9759806724783 AND locations.lng>-97.0268079347438 AND locations.lng<-96.8900800652562)) AND ((
|
685
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
686
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
687
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
688
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*6376.77271)
|
689
|
+
END)
|
690
|
+
<= 6.387))[0m
|
691
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "locations" WHERE ((locations.lat>32.861205327521695 AND locations.lat<32.9759806724783 AND locations.lng>-97.0268079347438 AND locations.lng<-96.8900800652562)) AND ((
|
692
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
693
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
694
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
695
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*6376.77271)
|
696
|
+
END)
|
697
|
+
<= 6.387))
|
698
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
699
|
+
[1m[35m (0.0ms)[0m begin transaction
|
700
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
701
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
702
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
703
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
704
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
705
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
706
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
707
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" WHERE (
|
708
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
709
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
710
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
711
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
712
|
+
END)
|
713
|
+
< 5 and city = 'Coppell')
|
714
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE (
|
715
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
716
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
717
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
718
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
719
|
+
END)
|
720
|
+
< 5 and city = 'Coppell')[0m
|
721
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
722
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
723
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
724
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
725
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
726
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
727
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
728
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
729
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
730
|
+
[1m[36mCustomLocation Load (0.1ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE (
|
731
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
732
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
733
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
734
|
+
END)
|
735
|
+
< 5 and city = 'Coppell')[0m
|
736
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "custom_locations" WHERE (
|
737
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
738
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
739
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
740
|
+
END)
|
741
|
+
< 5 and city = 'Coppell')
|
742
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
743
|
+
[1m[35m (0.0ms)[0m begin transaction
|
744
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
745
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
746
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
747
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
748
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
749
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
750
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
751
|
+
[1m[35mSQL (1.2ms)[0m SELECT "mock_organizations"."id" AS t0_r0, "mock_organizations"."name" AS t0_r1, "mock_addresses"."id" AS t1_r0, "mock_addresses"."addressable_id" AS t1_r1, "mock_addresses"."addressable_type" AS t1_r2, "mock_addresses"."street" AS t1_r3, "mock_addresses"."city" AS t1_r4, "mock_addresses"."state" AS t1_r5, "mock_addresses"."postal_code" AS t1_r6, "mock_addresses"."lat" AS t1_r7, "mock_addresses"."lng" AS t1_r8 FROM "mock_organizations" LEFT OUTER JOIN "mock_addresses" ON "mock_addresses"."addressable_id" = "mock_organizations"."id" AND "mock_addresses"."addressable_type" = 'MockOrganization' ORDER BY
|
752
|
+
(CASE WHEN mock_addresses.lat IS NULL OR mock_addresses.lng IS NULL THEN NULL ELSE
|
753
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(mock_addresses.lat))*COS(RADIANS(mock_addresses.lng))+
|
754
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(mock_addresses.lat))*SIN(RADIANS(mock_addresses.lng))+
|
755
|
+
SIN(0.5745378329739577)*SIN(RADIANS(mock_addresses.lat))))*3963.19)
|
756
|
+
END)
|
757
|
+
ASC
|
758
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(DISTINCT "mock_organizations"."id") FROM "mock_organizations" LEFT OUTER JOIN "mock_addresses" ON "mock_addresses"."addressable_id" = "mock_organizations"."id" AND "mock_addresses"."addressable_type" = 'MockOrganization' WHERE (
|
759
|
+
(CASE WHEN mock_addresses.lat IS NULL OR mock_addresses.lng IS NULL THEN NULL ELSE
|
760
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(mock_addresses.lat))*COS(RADIANS(mock_addresses.lng))+
|
761
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(mock_addresses.lat))*SIN(RADIANS(mock_addresses.lng))+
|
762
|
+
SIN(0.5745378329739577)*SIN(RADIANS(mock_addresses.lat))))*3963.19)
|
763
|
+
END)
|
764
|
+
< 3.97)[0m
|
765
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
766
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
767
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
768
|
+
[1m[36mLocation Load (0.1ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
769
|
+
[1m[35mCustomLocation Load (0.1ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
770
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
771
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
772
|
+
[1m[36mMockOrganization Load (0.1ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
773
|
+
[1m[35mMockAddress Load (0.1ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
774
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(DISTINCT "mock_people"."id") FROM "mock_people" LEFT OUTER JOIN "mock_families" ON "mock_families"."id" = "mock_people"."mock_family_id" LEFT OUTER JOIN "mock_houses" ON "mock_houses"."id" = "mock_families"."mock_house_id"[0m
|
775
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(DISTINCT "mock_people"."id") FROM "mock_people" LEFT OUTER JOIN "mock_families" ON "mock_families"."id" = "mock_people"."mock_family_id" LEFT OUTER JOIN "mock_houses" ON "mock_houses"."id" = "mock_families"."mock_house_id"
|
776
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
777
|
+
[1m[35m (0.0ms)[0m begin transaction
|
778
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
779
|
+
[1m[35mLocation Load (0.1ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
780
|
+
[1m[36mCustomLocation Load (0.1ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
781
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
782
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
783
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
784
|
+
[1m[36mMockAddress Load (0.1ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
785
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" WHERE ((locations.lat>32.86119876841712 AND locations.lat<32.97598723158287 AND locations.lng>-97.02681574837437 AND locations.lng<-96.89007225162564)) AND ((
|
786
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
787
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
788
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
789
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
790
|
+
END)
|
791
|
+
<= 3.97))
|
792
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE ((locations.lat>32.86119876841712 AND locations.lat<32.97598723158287 AND locations.lng>-97.02681574837437 AND locations.lng<-96.89007225162564)) AND ((
|
793
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
794
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
795
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
796
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
797
|
+
END)
|
798
|
+
<= 3.97))[0m
|
799
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
800
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
801
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
802
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
803
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
804
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
805
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
806
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
807
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
808
|
+
[1m[36mLocation Load (0.1ms)[0m [1mSELECT "locations".* FROM "locations" WHERE ((locations.lat>32.91663 AND locations.lat<32.96302 AND locations.lng>-96.982841 AND locations.lng<-96.919495))[0m
|
809
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "locations" WHERE ((locations.lat>32.91663 AND locations.lat<32.96302 AND locations.lng>-96.982841 AND locations.lng<-96.919495))
|
810
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
811
|
+
[1m[35m (0.0ms)[0m begin transaction
|
812
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
813
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
814
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
815
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
816
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
817
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
818
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
819
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" WHERE ((locations.lat>32.91663 AND locations.lat<32.96302 AND locations.lng>-96.982841 AND locations.lng<-96.919495)) ORDER BY
|
820
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
821
|
+
(ACOS(least(1,COS(0.5749084012807412)*COS(-1.6921170952541658)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
822
|
+
COS(0.5749084012807412)*SIN(-1.6921170952541658)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
823
|
+
SIN(0.5749084012807412)*SIN(RADIANS(locations.lat))))*3963.19)
|
824
|
+
END)
|
825
|
+
asc
|
826
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 4]]
|
827
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
828
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
829
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
830
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
831
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
832
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
833
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
834
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
835
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
836
|
+
[1m[36mLocation Load (0.1ms)[0m [1mSELECT "locations".* FROM "locations" WHERE ((locations.lat>32.91663 AND locations.lat<32.96302 AND locations.lng>-96.982841 AND locations.lng<-96.919495)) AND (id != 1)[0m
|
837
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
838
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
839
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
840
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
841
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
842
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
843
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
844
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
845
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
846
|
+
[1m[36mLocation Load (0.1ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = 1 AND ((locations.lat>32.91663 AND locations.lat<32.96302 AND locations.lng>-96.982841 AND locations.lng<-96.919495))[0m
|
847
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
848
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
849
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
850
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
851
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
852
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
853
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
854
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
855
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
856
|
+
[1m[36mLocation Load (0.1ms)[0m [1mSELECT "locations".* FROM "locations" WHERE ((locations.lat>32.91663 AND locations.lat<32.96302 AND locations.lng>-96.982841 AND locations.lng<-96.919495)) AND (id !=1)[0m
|
857
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
858
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
859
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
860
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
861
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
862
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
863
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
864
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
865
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
866
|
+
[1m[36mLocation Load (0.1ms)[0m [1mSELECT "locations".* FROM "locations" WHERE ((locations.lat>32.91663 AND locations.lat<32.96302 AND locations.lng>-96.982841 AND locations.lng<-96.919495))[0m
|
867
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "locations" WHERE ((locations.lat>32.91663 AND locations.lat<32.96302 AND locations.lng>-96.982841 AND locations.lng<-96.919495))
|
868
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
869
|
+
[1m[35m (0.0ms)[0m begin transaction
|
870
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
871
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
872
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
873
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
874
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
875
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
876
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
877
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" WHERE ((locations.lat>32.86119876841712 AND locations.lat<32.97598723158287 AND locations.lng>-97.02681574837437 AND locations.lng<-96.89007225162564)) AND ((
|
878
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
879
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
880
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
881
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
882
|
+
END)
|
883
|
+
<= 3.97))
|
884
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE ((locations.lat>32.86119876841712 AND locations.lat<32.97598723158287 AND locations.lng>-97.02681574837437 AND locations.lng<-96.89007225162564)) AND ((
|
885
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
886
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
887
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
888
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
889
|
+
END)
|
890
|
+
<= 3.97))[0m
|
891
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
892
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
893
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
894
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
895
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
896
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
897
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
898
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
899
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
900
|
+
[1m[36mCustomLocation Load (0.2ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE ((custom_locations.latitude>32.882922253211376 AND custom_locations.latitude<32.954263746788605 AND custom_locations.longitude>-97.00093732147718 AND custom_locations.longitude<-96.91595067852282)) AND ((
|
901
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
902
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
903
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
904
|
+
END)
|
905
|
+
<= 3.97))[0m
|
906
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "custom_locations" WHERE ((custom_locations.latitude>32.882922253211376 AND custom_locations.latitude<32.954263746788605 AND custom_locations.longitude>-97.00093732147718 AND custom_locations.longitude<-96.91595067852282)) AND ((
|
907
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
908
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
909
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
910
|
+
END)
|
911
|
+
<= 3.97))
|
912
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
913
|
+
[1m[35m (0.0ms)[0m begin transaction
|
914
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
915
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
916
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
917
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
918
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
919
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
920
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
921
|
+
[1m[35mCustomLocation Load (0.2ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE ((custom_locations.latitude>32.882922253211376 AND custom_locations.latitude<32.954263746788605 AND custom_locations.longitude>-97.00093732147718 AND custom_locations.longitude<-96.91595067852282)) AND ((
|
922
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
923
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
924
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
925
|
+
END)
|
926
|
+
<= 3.97))
|
927
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "custom_locations" WHERE ((custom_locations.latitude>32.882922253211376 AND custom_locations.latitude<32.954263746788605 AND custom_locations.longitude>-97.00093732147718 AND custom_locations.longitude<-96.91595067852282)) AND ((
|
928
|
+
(CASE WHEN custom_locations.latitude IS NULL OR custom_locations.longitude IS NULL THEN NULL ELSE
|
929
|
+
SQRT(POW(111.18189999999998*(32.918593-custom_locations.latitude),2)+
|
930
|
+
POW(77.5544425833814*(-96.958444-custom_locations.longitude),2))
|
931
|
+
END)
|
932
|
+
<= 3.97))[0m
|
933
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
934
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
935
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
936
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
937
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
938
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
939
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
940
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
941
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
942
|
+
[1m[36mLocation Load (0.1ms)[0m [1mSELECT "locations".* FROM "locations" WHERE (company_id = 1)[0m
|
943
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" IN (1)
|
944
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
945
|
+
[1m[35m (0.0ms)[0m begin transaction
|
946
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
947
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
948
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
949
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
950
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
951
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
952
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
953
|
+
[1m[35mLocation Load (0.4ms)[0m SELECT "locations".* FROM "locations" ORDER BY
|
954
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
955
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
956
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
957
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
958
|
+
END)
|
959
|
+
ASC
|
960
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
961
|
+
[1m[35m (0.0ms)[0m begin transaction
|
962
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
963
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
964
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
965
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
966
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
967
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
968
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
969
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" WHERE ((
|
970
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
971
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
972
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
973
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
974
|
+
END)
|
975
|
+
> 3.95))
|
976
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE ((
|
977
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
978
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
979
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
980
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
981
|
+
END)
|
982
|
+
> 3.95))[0m
|
983
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
984
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
985
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
986
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
987
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
988
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
989
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
990
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
991
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
992
|
+
[1m[36mLocation Load (0.3ms)[0m [1mSELECT "locations".* FROM "locations" ORDER BY
|
993
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
994
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
995
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
996
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
997
|
+
END)
|
998
|
+
asc[0m
|
999
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1000
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1001
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
1002
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1003
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
1004
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1005
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
1006
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
1007
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
1008
|
+
[1m[36mLocation Load (0.4ms)[0m [1mSELECT "locations".* FROM "locations" ORDER BY
|
1009
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1010
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1011
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1012
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1013
|
+
END)
|
1014
|
+
asc LIMIT 1[0m
|
1015
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1016
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1017
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
1018
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1019
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
1020
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1021
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
1022
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
1023
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
1024
|
+
[1m[36mLocation Load (0.4ms)[0m [1mSELECT "locations".* FROM "locations" WHERE (
|
1025
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1026
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1027
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1028
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1029
|
+
END)
|
1030
|
+
< 5 and city = 'Coppell')[0m
|
1031
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "locations" WHERE (
|
1032
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1033
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1034
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1035
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1036
|
+
END)
|
1037
|
+
< 5 and city = 'Coppell')
|
1038
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1039
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1040
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
1041
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
1042
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1043
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
1044
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1045
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
1046
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
1047
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" WHERE (
|
1048
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1049
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1050
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1051
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1052
|
+
END)
|
1053
|
+
< 3.97)
|
1054
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE (
|
1055
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1056
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1057
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1058
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1059
|
+
END)
|
1060
|
+
< 3.97)[0m
|
1061
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1062
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1063
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
1064
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1065
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
1066
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1067
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
1068
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
1069
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
1070
|
+
[1m[36mLocation Load (0.3ms)[0m [1mSELECT "locations".* FROM "locations" WHERE (
|
1071
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1072
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1073
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1074
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1075
|
+
END)
|
1076
|
+
< 5 and city = 'Coppell')[0m
|
1077
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "locations" WHERE (
|
1078
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1079
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1080
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1081
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1082
|
+
END)
|
1083
|
+
< 5 and city = 'Coppell')
|
1084
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1085
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1086
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
1087
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
1088
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1089
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
1090
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1091
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
1092
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
1093
|
+
[1m[35mLocation Load (0.4ms)[0m SELECT "locations".* FROM "locations" WHERE ((locations.lat>32.86119876841712 AND locations.lat<32.97598723158287 AND locations.lng>-97.02681574837437 AND locations.lng<-96.89007225162564)) AND ((
|
1094
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1095
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1096
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1097
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1098
|
+
END)
|
1099
|
+
<= 3.97))
|
1100
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE ((locations.lat>32.86119876841712 AND locations.lat<32.97598723158287 AND locations.lng>-97.02681574837437 AND locations.lng<-96.89007225162564)) AND ((
|
1101
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1102
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1103
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1104
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1105
|
+
END)
|
1106
|
+
<= 3.97))[0m
|
1107
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1108
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1109
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
1110
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1111
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
1112
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1113
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
1114
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
1115
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
1116
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1117
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1118
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
1119
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
1120
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1121
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
1122
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1123
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
1124
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
1125
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" WHERE (
|
1126
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1127
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1128
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1129
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*6376.77271)
|
1130
|
+
END)
|
1131
|
+
< 3.97)
|
1132
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE (
|
1133
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1134
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1135
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1136
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*6376.77271)
|
1137
|
+
END)
|
1138
|
+
< 3.97)[0m
|
1139
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1140
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1141
|
+
[1m[35mCompany Load (0.0ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
1142
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1143
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
1144
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1145
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
1146
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
1147
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
1148
|
+
[1m[36mLocation Load (0.4ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."company_id" = 1 ORDER BY
|
1149
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1150
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1151
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1152
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1153
|
+
END)
|
1154
|
+
ASC[0m
|
1155
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1156
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1157
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
1158
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1159
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
1160
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1161
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
1162
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
1163
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
1164
|
+
[1m[36mLocation Load (0.3ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."company_id" = 1 AND ((
|
1165
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1166
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1167
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1168
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1169
|
+
END)
|
1170
|
+
> 3.95))[0m
|
1171
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "locations" WHERE "locations"."company_id" = 1 AND ((
|
1172
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1173
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1174
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1175
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1176
|
+
END)
|
1177
|
+
> 3.95))
|
1178
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1179
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1180
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
1181
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
1182
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1183
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
1184
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1185
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
1186
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
1187
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."company_id" = 1 ORDER BY
|
1188
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1189
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1190
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1191
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1192
|
+
END)
|
1193
|
+
asc
|
1194
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1195
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1196
|
+
[1m[36mCompany Load (0.1ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
1197
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
1198
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1199
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
1200
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1201
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
1202
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
1203
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."company_id" = 1 ORDER BY
|
1204
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1205
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1206
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1207
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1208
|
+
END)
|
1209
|
+
asc LIMIT 1
|
1210
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1211
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1212
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
1213
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
1214
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1215
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
1216
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1217
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
1218
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
1219
|
+
[1m[35mLocation Load (0.3ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."company_id" = 1 AND (
|
1220
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1221
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1222
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1223
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1224
|
+
END)
|
1225
|
+
< 5 and city = 'Coppell')
|
1226
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE "locations"."company_id" = 1 AND (
|
1227
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1228
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1229
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1230
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1231
|
+
END)
|
1232
|
+
< 5 and city = 'Coppell')[0m
|
1233
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1234
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1235
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
1236
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1237
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
1238
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1239
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
1240
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
1241
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
1242
|
+
[1m[36mLocation Load (0.3ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."company_id" = 1 AND (
|
1243
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1244
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1245
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1246
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1247
|
+
END)
|
1248
|
+
< 3.97)[0m
|
1249
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "locations" WHERE "locations"."company_id" = 1 AND (
|
1250
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1251
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1252
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1253
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1254
|
+
END)
|
1255
|
+
< 3.97)
|
1256
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1257
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1258
|
+
[1m[36mCompany Load (0.0ms)[0m [1mSELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1[0m [["id", 1]]
|
1259
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 1]]
|
1260
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1261
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 5]]
|
1262
|
+
[1m[36mCustomLocation Load (0.0ms)[0m [1mSELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1263
|
+
[1m[35mMockOrganization Load (0.0ms)[0m SELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1 [["id", 1064917858]]
|
1264
|
+
[1m[36mMockAddress Load (0.0ms)[0m [1mSELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1[0m [["id", 206296981]]
|
1265
|
+
[1m[35mLocation Load (0.4ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."company_id" = 1 AND ((locations.lat>32.86119876841712 AND locations.lat<32.97598723158287 AND locations.lng>-97.02681574837437 AND locations.lng<-96.89007225162564)) AND ((
|
1266
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1267
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1268
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1269
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1270
|
+
END)
|
1271
|
+
<= 3.97))
|
1272
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "locations" WHERE "locations"."company_id" = 1 AND ((locations.lat>32.86119876841712 AND locations.lat<32.97598723158287 AND locations.lng>-97.02681574837437 AND locations.lng<-96.89007225162564)) AND ((
|
1273
|
+
(CASE WHEN locations.lat IS NULL OR locations.lng IS NULL THEN NULL ELSE
|
1274
|
+
(ACOS(least(1,COS(0.5745378329739577)*COS(-1.692244085410541)*COS(RADIANS(locations.lat))*COS(RADIANS(locations.lng))+
|
1275
|
+
COS(0.5745378329739577)*SIN(-1.692244085410541)*COS(RADIANS(locations.lat))*SIN(RADIANS(locations.lng))+
|
1276
|
+
SIN(0.5745378329739577)*SIN(RADIANS(locations.lat))))*3963.19)
|
1277
|
+
END)
|
1278
|
+
<= 3.97))[0m
|
1279
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1280
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1281
|
+
[1m[35mCompany Load (0.1ms)[0m SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT 1 [["id", 1]]
|
1282
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 1]]
|
1283
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 1]]
|
1284
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 5]]
|
1285
|
+
[1m[35mCustomLocation Load (0.0ms)[0m SELECT "custom_locations".* FROM "custom_locations" WHERE "custom_locations"."id" = ? LIMIT 1 [["id", 5]]
|
1286
|
+
[1m[36mMockOrganization Load (0.0ms)[0m [1mSELECT "mock_organizations".* FROM "mock_organizations" WHERE "mock_organizations"."id" = ? LIMIT 1[0m [["id", 1064917858]]
|
1287
|
+
[1m[35mMockAddress Load (0.0ms)[0m SELECT "mock_addresses".* FROM "mock_addresses" WHERE "mock_addresses"."id" = ? LIMIT 1 [["id", 206296981]]
|
1288
|
+
[1m[36mLocation Load (0.1ms)[0m [1mSELECT "locations".* FROM "locations" [0m
|
1289
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 2]]
|
1290
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 3]]
|
1291
|
+
[1m[35mLocation Load (0.0ms)[0m SELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1 [["id", 4]]
|
1292
|
+
[1m[36mLocation Load (0.0ms)[0m [1mSELECT "locations".* FROM "locations" WHERE "locations"."id" = ? LIMIT 1[0m [["id", 6]]
|
1293
|
+
[1m[35m (0.0ms)[0m rollback transaction
|