This repository was archived by the owner on Jul 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
SQLiteTable
syadeu edited this page Apr 14, 2021
·
1 revision
Namespace: Syadeu.Database
public struct SQLiteTable : ISQLiteReadOnlyTable, IEnumerable<IReadOnlyList<KeyValuePair<string, object>>>, IEnumerableSQLiteDatabase 에서 받아온 데이터 테이블 정보를 담습니다.
Inheritance: Object -> SQLiteTable
Implements: ISQLiteReadOnlyTable, IEnumerable<IReadOnlyList<KeyValuePair<string, object>>>, IEnumerable
-
for혹은foreach문으로 빠르게 테이블을 열 정보를 탐색할 수 있습니다.
모든 정보는 행 데이터인 SQLiteColumn 으로 정렬되어 담겨있습니다.
아래는 for 문으로 빠르게 테이블을 열을 탐색하는 방법에 대해 설명합니다.
public class TestSQLiteDatabase
{
public void Test()
{
SQLiteDatabase db = SQLiteDatabase.Initialize(Path.Combine(Application.dataPath, "testDatabase"), "testDB", true);
/*
... Some Data Injection ...
*/
// SQLiteDatabase 에서 'TestTable' 이름의 테이블을 가져옵니다.
SQLiteTable table = db.GetTable("TestTable");
for (int i = 0; i < table.Count; i++)
{
IReadOnlyList<KeyValuePair<string, object>> row = table[i];
/*
... Some Data Works ...
*/
}
}
}아래는 간편하게 원하는 특정 행을 가져오는 방법에 대해 설명합니다.
public void Test()
{
/*
... Some Data Works ...
*/
SQLiteTable table = db.GetTable("TestTable");
// 행 정보를 string 값으로 읽어옵니다.
// 값은 행의 이름입니다.
SQLiteColumn wantedColumn = table["TargetColumn"];
}| Name | Description |
|---|---|
In-Development IsByteTable |
개발 중 |
| Name | 이 테이블의 이름입니다. |
| Columns | 이 테이블내 존재하는 컬럼들입니다. |
| PrimaryKeyPairs | 메인 키 값을 기준으로 만들어진 Dictionary 를 반환합니다. |
| Count | 이 테이블 열의 총 갯수입니다. |
| Name | Description |
|---|---|
| Rename | 실제 데이터에는 적용안되고 복사본을 반환합니다. 실데이터 적용을 원하면 SQLiteDatabase.RenameTable 메소드를 사용하세요. |
| IsValid | 이 테이블이 유효한지 반환합니다. |
| GetColumnsInfo | 이 테이블의 컬럼 정보를 받아옵니다 |
| HasKey<T> | 해당 메인 키 값이 존재하는지 반환합니다. |
| HasColumnValue | 해당 컬럼에 값이 해당 값이 존재하는지 반환합니다. |
| HasColumn | 해당 컬럼이 존재하는지 반환합니다. |
| CompairLine<T> | 같은 컬럼을 가진 두 테이블 데이터를 메인 키 값으로 비교합니다. 단 하나라도 행의 값이 다르거나, 비교 대상이 해당 키를 갖고있지 않으면 false 를 반환합니다. |
| ReadLine | 해당 열을 읽어옵니다. |
| ReadLine<T> | 해당 열을 SQLiteTableAttribute 선언된 구조체로 반환합니다. |
| TryGetColumn | 이 테이블에서 해당 이름을 가진 행을 반환합니다. |
| TryReadLine | 해당 열을 반환합니다. |
| TryReadLine<T> | 해당 열을 SQLiteTableAttribute 선언된 구조체로 반환합니다. |
| TryReadLineWithPrimary<T> | 해당 키 값이 일치하는 열을 SQLiteTableAttribute 선언된 구조체로 반환합니다. |
| GetEnumerator |
- Interfaces
- Enums
- SystemFlag
- CoreSystemExceptionFlag
- UserTagFlag
- CustomTagFlag
- ObValueDetection
- ConsoleFlag
- CommandSetting
- Attributes
- Abstract Classes
- Classes
- CoreSystem
- CoreSystemSettings
- PrefabManager
- PrefabList
- RenderManager
- RenderController
-
ConsoleWindow
- CommandDefinition
- CommandField
- CommandRequires
- FMODSystem
- UserTagNameModule
- CustomTagNameModule
- Timer
- BackgroundJob
- ForegroundJob
- WaitForBackgroundJob
- WaitForBackgroundJobWorker
- WaitForForegroundJob
- WaitForTimer
- BackgroundJobWorker
- ObArray
- ObClass
- ObDictionary
- ObList
- ObQueue
- ObValue
- ExtensionMethods
- ThreadSafe
- Structs
- CoreRoutine
- SQLiteDatabase
- SQLiteTable
- SQLiteColumn
- SQLiteVersionInfoTableData
- Bound
- Pole
- Vector2
- Vector3
- Exceptions
- Syadeu.Presentation
- PresentationManager
- SceneList
- EntityDataList
- CustomLoadingScene
- DefaultPresentationGroup
- PresentationGroupEntity
- IPresentationSystemGroup
- PresentationSystemGroup<T>
- PresentationSystem<T>
- PresentationSystem<TGroup, TSystem>
- PresentationSystemEntity<T>
- PresentationSystemModule<TSystem>
- PresentationSystemID
- INotifySystemModule<TModule>
- IExecutable<T>
- PresentationLoop
- PresentationResult
- IReference
- Reference
- SubSystemAttribute
- LoadingSceneSetupEntity
- SceneReference
- SceneSystem
- EntitySystem
- EntityBoundSystem
- EntityRaycastSystem
- EntityExtensionMethods
- AttributeAcceptOnlyAttribute
- EntityAcceptOnlyAttribute
- CoroutineSystem
- CoroutineJob
- ICoroutineJob
- UpdateLoop
- RaycastInfo
- ObjectBase
- ProcessorBase
- WaitForPresentationSystem<T>
- WaitForProxy<T>
- Syadeu.Collections
- AABB
- Plane
- PropertyBlockBase
- PropertyBlock<T>
- ActionWrapper
- BinaryGrid
- CLRContainer
- CLRSingleTone
- CLSTypedDictionary<TValue>
- CLSTypedDictionary<TKey, TValue>
- Direction
- EntityID
- EntityShortID
- IEntityDataID
- IInstance
- IInstance<T>
- Instance
- Instance<T>
- InstanceID
- FixedInstanceList16<T>
- FixedInstanceList64<T>
- IFixedReference
- IFixedReference<T>
- FixedReference
- FixedReference<T>
- FixedReferenceList16<T>
- FixedReferenceList64<T>
- IFixedReferenceList<T>
- FixedListExtensionMethods
- IEntity
- IEntityData
- IAttribute
- IObject
- IEntityComponent
- IPrefabReference
- IPrefabResource
- IEmpty
- IValidation
- FNV1a32
- FNV1a64
- Hash
- Syadeu.Collections.Converters
- Syadeu.Collections.Proxy
- Syadeu.Presentation.Proxy
- Syadeu.Presentation.Internal
- Syadeu.Presentation.Entities
- Syadeu.Presentation.Attributes
- Syadeu.Presentation.Components
- Syadeu.Presentation.Actions
- Syadeu.Presentation.Render
- CameraData
- CameraFrustum
- IntersectionType
- RenderSystem
- WorldCanvasSystem
- Syadeu.Presentation.Data
- DataContainerSystem
- DataObjectBase
- EntityAnimationClipEventData