The TFDLocalSQL component creates a local SQL engine that allows SQL queries (CRUD & DML) across local DataSets. Works with TFDMemTable or any TDataSet descendant.
More information: http://delphi.org/?p=1951
2. EMBARCADERO
TECHNOLOGIES
This
Skill
Sprint
Works
with
.
.
.
• Windows
• Mac
OS
X
• Android
• iOS
• RAD
Studio
• Appmethod
• Object
Pascal
• C++
• RAD
Studio
XE7
DocWiki
– http://embt.co/latestdocwiki
– http://docwiki.embarcadero.com/RADStudio/en/
• Appmethod
September
2014
DocWiki
– http://embt.co/AppmethodTopics
– http://docwiki.appmethod.com/appmethod/topics/en/
• Appmethod
supports
the
FireMonkey
framework
on
all
4
platforms
while
RAD
Studio,
Delphi
and
C++Builder
also
support
VCL
on
Windows.
Contact
sales
with
any
questions!
3. EMBARCADERO
TECHNOLOGIES
FireDAC’s
TFDLocalSQL
for
Local
SQL
• Run
SQL
queries
locally
on
TDataSet
descendants.
• Works
for
any
TDataSet
descendants.
• Simplify
code
with
SQL
instead
of
spinning
through
records.
• Join
queries
between
heterogeneous
data
sources.
• Supports
the
INSERT/UPDATE/DELETE
SQL
commands
as
transactions
and
savepoints.
4. EMBARCADERO
TECHNOLOGIES
Some
Possible
Uses
• Heterogeneous
queries
(Queryable
datasets
have
result
sets
from
different
DBs).
• In-‐memory
database
(TFDMemTables
serving
as
the
datasets).
• Advanced
offline
mode
(While
main
DB
is
not
accessible,
an
application
is
still
able
to
perform
the
SQL
queries
locally.)
• Advanced
DataSnap
client
(the
data
delivered
by
the
DataSnap
driver
to
the
client
can
be
queried
locally).
• Simplified
migration.
(Use
3rd-‐party
TDataSet
objects
in
an
application,
and
use
FireDAC
API
to
work
with
these
data
sources.)4
5. EMBARCADERO
TECHNOLOGIES
Unsupported
SQL
and
Alternatives
• ALTER
TABLE
...
ADD
COLUMN
-‐
Instead,
change
the
structure
via
the
DataSet.
• DROP
TABLE
-‐
When
a
dataset
is
unlinked
from
the
Local
SQL
engine,
it
is
automatically
dropped
(not
freed).
• CREATE
INDEX
/
DROP
INDEX
-‐
Instead
of
the
SQL
indexes,
use
the
DataSet
indexes.
• CREATE
TRIGGER
/
DROP
TRIGGER
-‐
Instead
of
the
triggers,
use
the
DataSet
events.
5
8. EMBARCADERO
TECHNOLOGIES
TFDLocalSQL
Summary
• Works
with
any
TDataSet
descendent.
• Supports
DML/CRUD,
but
no
DDL.
• Supports
Transactions
and
SavePoints.
• Uses
SQLite
internally.
• Query
across
multiple
heterogeneous
DataSets.
9. EMBARCADERO
TECHNOLOGIES
TFDLocalSQL
Resources
• Samples
– C:UsersPublicDocumentsEmbarcaderoStudio15.0Samples
Object
PascalDatabaseFireDACSamplesComp
LayerTFDLocalSQL
• DocWiki
– http://docwiki.embarcadero.com/RADStudio/en/Local_SQL_(FireDAC)
– http://docwiki.embarcadero.com/Libraries/en/FireDAC.Phys.SQLiteVDataSet.TFDLocalSQL
• Blog
Posts
– Dmitry
Arefiev
– FireDAC
Local
SQL
video:
https://youtu.be/QA-‐xhfYoEq4
– CodeRage
9:
FireDAC
Tips,
Tricks
and
News:
http://youtu.be/gljfudAKlTI
– Jens
Fudge’s
Local
SQL
video:
https://youtu.be/fJsmKiUz6VU
– All
these
links
and
more:
http://delphi.org/?p=1951
https://commons.wikimedia.org/wiki/File:Iceberg.jpg
10. EMBARCADERO
TECHNOLOGIES
Next
Time….
• Preview:
Box2D
• Sneak
peak
from
a
future
release
• Cross
platform
2D
physics
engine
• Tuesday
the
24th
of
March
– 6AM
San
Francisco
/
9AM
New
York
/
1PM
London
/
2PM
Milan
/
13
UTC
– 11AM
San
Francisco
/
2PM
New
York
/
6PM
London
/
7PM
Milan
/
18
UTC
– 5PM
San
Francisco
/
Wed
9AM
Tokyo
/
Wed
11AM
Sydney
/
0
UTC
Sign-‐up:
http://www.embarcadero.com/landing-‐pages/skill-‐sprints
11. EMBARCADERO
TECHNOLOGIES
Next
Time….
• FireDAC:
BDE
to
InterBase
Migration
• Paradox
and
BDE
are
Deprecated
• Take
advantage
of
new
FireDAC
and
InterBase
features
• Thursday
the
26th
of
March
– 6AM
San
Francisco
/
9AM
New
York
/
1PM
London
/
2PM
Milan
/
13
UTC
– 11AM
San
Francisco
/
2PM
New
York
/
6PM
London
/
7PM
Milan
/
18
UTC
– 5PM
San
Francisco
/
Fri
9AM
Tokyo
/
Fri
11AM
Sydney
/
0
UTC
Sign-‐up:
http://www.embarcadero.com/landing-‐pages/skill-‐sprints
(2nd
sign-‐up
on
the
left)